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

Unified Diff: lib/init.js

Issue 29449592: Issue 5183 - Provide async interface for FileSystem (Closed) Base URL: https://hg.adblockplus.org/libadblockplus/
Patch Set: Remove a #include Utils.h from test. Created June 2, 2017, 7:38 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
Index: lib/init.js
===================================================================
--- a/lib/init.js
+++ b/lib/init.js
@@ -13,34 +13,35 @@
*
* You should have received a copy of the GNU General Public License
* along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
*/
let {Prefs} = require("prefs");
let {FilterNotifier} = require("filterNotifier");
-let prefsInitDone = false;
let filtersInitDone = false;
function checkInitialized()
{
- if (prefsInitDone && filtersInitDone)
+ if (Prefs.initialized && filtersInitDone)
{
checkInitialized = function() {};
_triggerEvent("_init", require("filterStorage").FilterStorage.firstRun);
}
}
Prefs._initListener = function()
{
- prefsInitDone = true;
checkInitialized();
};
+if (Prefs.initialized)
sergei 2017/06/16 15:05:54 Could you please move all these changes in JS file
hub 2017/06/16 21:52:54 Done. https://codereview.adblockplus.org/29467599
+ checkInitialized();
+
FilterNotifier.addListener(function(action)
{
if (action === "load")
{
let {FilterStorage} = require("filterStorage");
if (FilterStorage.firstRun)
{
// No data, must be a new user or someone with corrupted data - initialize

Powered by Google App Engine
This is Rietveld