Skip to content
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.

Commit

Permalink
Revert "Start WebExtension immediately"
Browse files Browse the repository at this point in the history
This reverts commit 81a567a.
  • Loading branch information
jaredhirsch committed May 24, 2017
1 parent 3952008 commit c849b50
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion addon/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,28 @@ const prefObserver = {
}
};

const appStartupObserver = {
register() {
Services.obs.addObserver(this, "sessionstore-windows-restored", false); // eslint-disable-line mozilla/no-useless-parameters
},

unregister() {
Services.obs.removeObserver(this, "sessionstore-windows-restored", false); // eslint-disable-line mozilla/no-useless-parameters
},

observe() {
appStartupDone();
this.unregister();
}
}

const APP_STARTUP = 1;
function startup(data, reason) { // eslint-disable-line no-unused-vars
appStartupDone();
if (reason === APP_STARTUP) {
appStartupObserver.register();
} else {
appStartupDone();
}
prefObserver.register();
addonResourceURI = data.resourceURI;
// eslint-disable-next-line promise/catch-or-return
Expand Down

0 comments on commit c849b50

Please sign in to comment.