Permalink
Browse files

Bug 819454: Avoid nuking module sandboxes when the application is shu…

…tting down.
  • Loading branch information...
1 parent d6a76a2 commit 4e1166445ccad9d1f0060387b481a32b52012cf9 @Mossop committed Feb 20, 2013
Showing with 10 additions and 6 deletions.
  1. +10 −6 app-extension/bootstrap.js
View
@@ -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);
+ }
}
};

0 comments on commit 4e11664

Please sign in to comment.