aboutsummaryrefslogtreecommitdiffstats
path: root/platform
diff options
context:
space:
mode:
Diffstat (limited to 'platform')
-rw-r--r--platform/firefox/bootstrap.js12
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;
}