Skip to content
This repository has been archived by the owner on Feb 26, 2022. It is now read-only.

Commit

Permalink
Merge pull request #809 from Mossop/bug819454
Browse files Browse the repository at this point in the history
Bug 819454: Avoid nuking module sandboxes when the application is shutting down. r=ochemeau(cherry picked from commit 03f0890)
  • Loading branch information
Mossop authored and KWierso committed Feb 21, 2013
1 parent da96d23 commit f496376
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions app-extension/bootstrap.js
Expand Up @@ -229,12 +229,16 @@ function shutdown(data, reasonCode) {
if (loader) {
unload(loader, reason);
unload = null;
// Avoid leaking all modules when something goes wrong with one particular
// module. Do not clean it up immediatly in order to allow executing some
// actions on addon disabling.
// We need to keep a reference to the timer, otherwise it is collected
// and won't ever fire.
nukeTimer = setTimeout(nukeModules, 1000);

// Don't waste time cleaning up if the application is shutting down
if (reason != "shutdown") {
// Avoid leaking all modules when something goes wrong with one particular
// module. Do not clean it up immediatly in order to allow executing some
// actions on addon disabling.
// We need to keep a reference to the timer, otherwise it is collected
// and won't ever fire.
nukeTimer = setTimeout(nukeModules, 1000);
}
}
};

Expand Down

0 comments on commit f496376

Please sign in to comment.