gorhill 9 years ago
parent
commit
50189a450f
  1. 14
      platform/firefox/bootstrap.js

14
platform/firefox/bootstrap.js

@ -19,7 +19,7 @@
Home: https://github.com/gorhill/uMatrix Home: https://github.com/gorhill/uMatrix
*/ */
/* global ADDON_UNINSTALL, APP_SHUTDOWN, APP_STARTUP */
/* global ADDON_UNINSTALL, APP_SHUTDOWN */
/* exported startup, shutdown, install, uninstall */ /* exported startup, shutdown, install, uninstall */
'use strict'; 'use strict';
@ -46,7 +46,7 @@ const restartListener = {
/******************************************************************************/ /******************************************************************************/
function startup(data, reason) {
function startup(data/*, reason*/) {
if ( data !== undefined ) { if ( data !== undefined ) {
version = data.version; version = data.version;
} }
@ -84,7 +84,13 @@ function startup(data, reason) {
); );
}; };
if ( reason !== APP_STARTUP ) {
var ready = false;
try {
ready = appShell.hiddenDOMWindow &&
appShell.hiddenDOMWindow.document;
} catch (ex) {
}
if ( ready ) {
onReady(); onReady();
return; return;
} }
@ -99,7 +105,7 @@ function startup(data, reason) {
} }
try { try {
appShell.hiddenDOMWindow;
void appShell.hiddenDOMWindow;
} catch (ex) { } catch (ex) {
return; return;
} }

Loading…
Cancel
Save