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

Commit

Permalink
Fix #3323, immediately exit when Firefox is exiting
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredhirsch authored and ianb committed Aug 11, 2017
1 parent c60fd37 commit 916c353
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions addon/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,11 @@ function shutdown(data, reason) { // eslint-disable-line no-unused-vars
id: ADDON_ID,
resourceURI: addonResourceURI
});
// Immediately exit if Firefox is exiting, #3323
if (reason === APP_SHUTDOWN) {
stop(webExtension, reason);
return;
}
// Because the prefObserver is unregistered above, this _should_ terminate the promise chain.
appStartupPromise = appStartupPromise.then(() => { stop(webExtension, reason); });
}
Expand Down

0 comments on commit 916c353

Please sign in to comment.