im/modules/ibCore.jsm
changeset 17108 c5a41348fbaa96b7c4e8a7d08465e47fbda1d8eb
parent 17102 3fbfea09396047f4f83be0524c553522f51f9e89
child 17112 295ec981ed4c2f2db6e79c878fffbe9f90cca5f3
--- a/im/modules/ibCore.jsm
+++ b/im/modules/ibCore.jsm
@@ -56,16 +56,21 @@ var Core = {
       return false;
     }
 
     if (!Components.classes["@mozilla.org/chat/core-service;1"]) {
       this._promptError("startupFailure.xpcomRegistrationError");
       return false;
     }
 
+    // Trigger asynchronous initialization of the password service.
+    Services.logins.initializationPromise.catch(() => {
+      this._promptError("startupFailure.passwordServiceError");
+    });
+
     this.initLibpurpleOverrides();
 
     try {
       Services.core.init();
     }
     catch (e) {
       this._promptError("startupFailure.purplexpcomInitError", e);
       return false;
@@ -121,17 +126,19 @@ var Core = {
       usageContext: Ci.imICommand.CMD_CONTEXT_ALL,
       priority: Ci.imICommand.CMD_PRIORITY_DEFAULT,
       run: (aMsg, aConv) => {
         this.showDebugLog(aConv.account.id);
         return true;
       }
     });
 
-    this._showAccountManagerIfNeeded(true);
+    Services.logins.initializationPromise.then(() => {
+      this._showAccountManagerIfNeeded(true));
+    });
     return true;
   },
 
   showDebugLog: function(aAccountId) {
     this.showTab("debugLogPanel", aPanel => {
       aPanel.browser.addEventListener("DOMContentLoaded", () => {
         aPanel.initAccountList(aAccountId);
         aPanel.showDebugLog();