diff options
author | gorhill <rhill@raymondhill.net> | 2015-09-25 12:26:56 -0400 |
---|---|---|
committer | gorhill <rhill@raymondhill.net> | 2015-09-25 12:26:56 -0400 |
commit | 6c65672db0814d6202f7e4c20dba75f77e2426ff (patch) | |
tree | c7efed1c235f4d770d86f621cb4ba0adef946bf0 /platform | |
parent | f681bac4071ed1bac978ebd2d161490d37e6793c (diff) | |
download | uBlock-6c65672db0814d6202f7e4c20dba75f77e2426ff.zip uBlock-6c65672db0814d6202f7e4c20dba75f77e2426ff.tar.gz uBlock-6c65672db0814d6202f7e4c20dba75f77e2426ff.tar.bz2 |
this fixes #640
Diffstat (limited to 'platform')
-rw-r--r-- | platform/firefox/bootstrap.js | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/platform/firefox/bootstrap.js b/platform/firefox/bootstrap.js index d1adfc4..c765d98 100644 --- a/platform/firefox/bootstrap.js +++ b/platform/firefox/bootstrap.js @@ -19,7 +19,7 @@ Home: https://github.com/gorhill/uBlock */ -/* global ADDON_UNINSTALL, APP_SHUTDOWN, APP_STARTUP */ +/* global ADDON_UNINSTALL, APP_SHUTDOWN */ /* exported startup, shutdown, install, uninstall */ 'use strict'; @@ -48,7 +48,7 @@ const restartListener = { /******************************************************************************/ -function startup(data, reason) { +function startup(data/*, reason*/) { if ( data !== undefined ) { version = data.version; } @@ -86,7 +86,13 @@ function startup(data, reason) { ); }; - if ( reason !== APP_STARTUP ) { + var ready = false; + try { + ready = appShell.hiddenDOMWindow && + appShell.hiddenDOMWindow.document; + } catch (ex) { + } + if ( ready ) { onReady(); return; } |