Bug 1388145 - Move _createExtraDefaultProfile to an idle callback. r=florian draft
authorFelipe Gomes <felipc@gmail.com>
Wed, 09 Aug 2017 15:44:32 -0300
changeset 643426 fe007e2a7fa8812196e9a7c121a7eb0686b5d9c2
parent 643425 ababa118265f4257bcd397cfd811be41981782fc
child 643427 38c34fb5b36d7c977a938528f7670c966e461227
push id73095
push userfelipc@gmail.com
push dateWed, 09 Aug 2017 18:46:00 +0000
reviewersflorian
bugs1388145
milestone57.0a1
Bug 1388145 - Move _createExtraDefaultProfile to an idle callback. r=florian MozReview-Commit-ID: 2sBcd2hz8TX
browser/components/nsBrowserGlue.js
--- a/browser/components/nsBrowserGlue.js
+++ b/browser/components/nsBrowserGlue.js
@@ -1033,20 +1033,16 @@ BrowserGlue.prototype = {
     SimpleServiceDiscovery.search(120 * 1000);
   },
 
   // All initial windows have opened.
   _onWindowsRestored: function BG__onWindowsRestored() {
     BrowserUsageTelemetry.init();
     BrowserUITelemetry.init();
 
-    if (AppConstants.MOZ_DEV_EDITION) {
-      this._createExtraDefaultProfile();
-    }
-
     this._initServiceDiscovery();
 
     // Show update notification, if needed.
     if (Services.prefs.prefHasUserValue("app.update.postupdate"))
       this._showUpdateNotification();
 
     ExtensionsUI.init();
 
@@ -1154,16 +1150,22 @@ BrowserGlue.prototype = {
             Cc[WINTASKBAR_CONTRACTID].getService(Ci.nsIWinTaskbar).available) {
           let temp = {};
           Cu.import("resource:///modules/WindowsJumpLists.jsm", temp);
           temp.WinTaskbarJumpList.startup();
         }
       });
     }
 
+    if (AppConstants.MOZ_DEV_EDITION) {
+      Services.tm.idleDispatchToMainThread(() => {
+        this._createExtraDefaultProfile();
+      });
+    }
+
     Services.tm.idleDispatchToMainThread(() => {
       this._checkForDefaultBrowser();
     });
   },
 
   /**
    * Use this function as an entry point to schedule tasks that need
    * to run once per session, at any arbitrary point in time.