Bug 1013307 - Don't try to open account manager at shutdown. r=florian
--- a/im/modules/ibCore.jsm
+++ b/im/modules/ibCore.jsm
@@ -11,17 +11,18 @@ Cu.import("resource:///modules/ibNotific
Cu.import("resource:///modules/ibSounds.jsm");
Cu.import("resource:///modules/imXPCOMUtils.jsm");
var Core = {
_events: [
"account-disconnected",
"browser-request",
"handle-xul-text-link",
- "quit-application-requested"
+ "quit-application-requested",
+ "quit-application-granted"
],
get bundle() { return l10nHelper("chrome://instantbird/locale/core.properties"); },
initLibpurpleOverrides: function() {
let forcePurple = Services.prefs.getCharPref("chat.prpls.forcePurple")
.split(",")
.map(String.trim)
@@ -286,16 +287,23 @@ var Core = {
aSubject.QueryInterface(Ci.nsISupportsPRBool).data = true;
return;
}
if (aTopic == "quit-application-requested") {
this._onQuitRequest(aSubject, aData);
return;
}
+
+ if (aTopic == "quit-application-granted") {
+ // Don't try to pop up the account manager during shutdown
+ // (it would fail anyway).
+ this._showAccountManagerIfNeeded = () => {};
+ return;
+ }
},
_onQuitRequest: function (aCancelQuit, aQuitType) {
// The request has already been canceled somewhere else
if ((aCancelQuit instanceof Components.interfaces.nsISupportsPRBool)
&& aCancelQuit.data)
return;