This commit is contained in:
gorhill 2015-09-25 12:26:56 -04:00
parent f681bac407
commit 6c65672db0
1 changed files with 9 additions and 3 deletions

View File

@ -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;
}