Bug 1013307 - Don't try to open account manager at shutdown. r=florian
authoraleth <aleth@instantbird.org>
Wed, 12 Aug 2015 19:31:52 +0200
changeset 18261 639709ee79764cd725fb10ebecb41f1cd5547141
parent 18260 974d4f960cf27c5e9971406dc4ad7e9c4c9e5dd8
child 18262 328503b8eba455c491c38e86a625801ad2ffa889
push id11212
push useraleth@instantbird.org
push dateWed, 12 Aug 2015 17:38:41 +0000
treeherdercomm-central@2e390373ca65 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersflorian
bugs1013307
Bug 1013307 - Don't try to open account manager at shutdown. r=florian
im/modules/ibCore.jsm
--- 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;