Bug 1391337 - Do not initialize gSync in nonBrowserWindowDelayedStartup. r?markh draft
authorEdouard Oger <eoger@fastmail.com>
Thu, 17 Aug 2017 14:13:49 -0400
changeset 648388 611cadb03c007184ad8ebf6ba4fe2ca948d4920a
parent 648384 e365137fa61bfd729617ba1ebf9f1ed79facd1f2
child 726815 05a7dc7b2d290d3ee528981d6503f25ad44fc789
push id74744
push userbmo:eoger@fastmail.com
push dateThu, 17 Aug 2017 18:18:59 +0000
reviewersmarkh
bugs1391337
milestone57.0a1
Bug 1391337 - Do not initialize gSync in nonBrowserWindowDelayedStartup. r?markh MozReview-Commit-ID: H5ahbcFZnFX
browser/base/content/browser-sync.js
browser/base/content/browser.js
--- a/browser/base/content/browser-sync.js
+++ b/browser/base/content/browser-sync.js
@@ -85,18 +85,17 @@ var gSync = {
       // we open the window. We can avoid a repaint.
       if (state.status != UIState.STATUS_NOT_CONFIGURED) {
         this.updateAllUI(state);
       }
     }
   },
 
   init() {
-    // Bail out if we're already initialized or for hidden windows.
-    if (this._initialized || window.location.href != getBrowserURL()) {
+    if (this._initialized) {
       return;
     }
 
     for (let topic of this._obs) {
       Services.obs.addObserver(this, topic, true);
     }
 
     this._generateNodeGetters();
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -1944,21 +1944,16 @@ if (AppConstants.platform == "macosx") {
     this._delayedStartupTimeoutId = null;
 
     // initialise the offline listener
     BrowserOffline.init();
 
     // initialize the private browsing UI
     gPrivateBrowsingUI.init();
 
-    // initialize the sync UI
-    requestIdleCallback(() => {
-      gSync.init();
-    }, {timeout: 1000 * 5});
-
     if (AppConstants.E10S_TESTING_ONLY) {
       gRemoteTabsUI.init();
     }
   };
 
   gBrowserInit.nonBrowserWindowShutdown = function() {
     let dockSupport = Cc["@mozilla.org/widget/macdocksupport;1"]
                       .getService(Ci.nsIMacDockSupport);