Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/prefs.js

Issue 29449592: Issue 5183 - Provide async interface for FileSystem (Closed) Base URL: https://hg.adblockplus.org/libadblockplus/
Patch Set: Updated implementation. Created June 2, 2017, 3:49 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« lib/init.js ('K') | « lib/init.js ('k') | libadblockplus.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/prefs.js
===================================================================
--- a/lib/prefs.js
+++ b/lib/prefs.js
@@ -96,16 +96,17 @@
values[key] = data[key];
}
catch (e)
{
Cu.reportError(e);
}
}
+ Prefs.initialized = true;
if (typeof Prefs._initListener == "function")
Prefs._initListener();
});
}
function save()
{
if (isSaving)
@@ -120,16 +121,18 @@
{
isSaving = false;
if (isDirty)
save();
});
}
let Prefs = exports.Prefs = {
+ initialized: false,
+
addListener: function(listener)
{
if (listeners.indexOf(listener) < 0)
listeners.push(listener);
},
removeListener: function(listener)
{
« lib/init.js ('K') | « lib/init.js ('k') | libadblockplus.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld