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

Unified Diff: lib/prefs.js

Issue 29467599: Noissue - Fix some execution order issues in the prefs initialisation (Closed) Base URL: https://hg.adblockplus.org/libadblockplus/
Patch Set: Created June 16, 2017, 5:29 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
« no previous file with comments | « lib/init.js ('k') | no next file » | 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)
{
« no previous file with comments | « lib/init.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld