Bug 1239963 - Stop unloading style sheets and destroying the loop-button on shutdown to help performance and Talos test failures. r=mikedeboer

This commit is contained in:
Mark Banner 2016-01-15 11:14:50 +00:00
parent 2933d9fc72
commit 3ada5579b8

View File

@ -859,7 +859,7 @@ function startup() {
* Called when the add-on is shutting down, could be for re-installation
* or just uninstall.
*/
function shutdown() {
function shutdown(data, reason) {
// Close any open chat windows
Cu.import("resource:///modules/Chat.jsm");
let isLoopURL = ({ src }) => /^about:loopconversation#/.test(src);
@ -883,6 +883,12 @@ function shutdown() {
// Stop waiting for browser windows to open.
wm.removeListener(WindowListener);
// If the app is shutting down, don't worry about cleaning up, just let
// it fade away...
if (reason == APP_SHUTDOWN) {
return;
}
CustomizableUI.destroyWidget("loop-button");
// Unload stylesheets.