Backed out changeset 5d320d8864e9 (bug 1353013) for failing e.g. test_accessiblecaret_cursor_mode.py of Marionette headless on OS X. r=backout
authorSebastian Hengst <archaeopteryx@coole-files.de>
Tue, 05 Sep 2017 22:44:20 +0200
changeset 428536 5ea49e6b1af6164ddf78dee5fe00c2a947b0bfcf
parent 428535 6e875574d0cbdcac1322f9b3be1090847de404ae
child 428537 35df0b24828dad43ae58e22db82dd9e64e03136e
push id7761
push userjlund@mozilla.com
push dateFri, 15 Sep 2017 00:19:52 +0000
treeherdermozilla-beta@c38455951db4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1353013
milestone57.0a1
backs out5d320d8864e90aa9684462251fee5b60f055ea9b
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset 5d320d8864e9 (bug 1353013) for failing e.g. test_accessiblecaret_cursor_mode.py of Marionette headless on OS X. r=backout
browser/base/content/browser.js
browser/base/content/tabbrowser.xml
toolkit/modules/Services.jsm
toolkit/modules/tests/xpcshell/test_Services.js
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -1585,19 +1585,16 @@ var gBrowserInit = {
     gBrowser.tabContainer.addEventListener("TabSelect", function() {
       for (let panel of document.querySelectorAll("panel[tabspecific='true']")) {
         if (panel.state == "open") {
           panel.hidePopup();
         }
       }
     });
 
-    // Prepare preloaded browser for the next new tab to open.
-    gBrowser.requestPreloadBrowser();
-
     this.delayedStartupFinished = true;
 
     _resolveDelayedStartup();
 
     SessionStore.promiseAllWindowsRestored.then(() => {
       this._schedulePerWindowIdleTasks();
       document.documentElement.setAttribute("sessionrestored", "true");
     });
--- a/browser/base/content/tabbrowser.xml
+++ b/browser/base/content/tabbrowser.xml
@@ -2094,65 +2094,25 @@
             // and the URL is "about:newtab". We do not support preloading for
             // custom newtab URLs.
             return Services.prefs.getBoolPref("browser.newtab.preload") &&
                    !aboutNewTabService.overridden;
           ]]>
         </body>
       </method>
 
-      <field name="_preloadBrowserMinUserIdleSeconds">1</field>
-      <field name="_preloadBrowserMinIdlePeriodMs">40</field>
-      <method name="requestPreloadBrowser">
-        <body><![CDATA[
-          // Do nothing if we have a preloaded browser already or we're about
-          // to create one or preloading is disabled.
-          if (this._preloadedBrowser ||
-              this._preloadBrowserIdleObserver ||
-              !this._isPreloadingEnabled()) {
-            return;
-          }
-
-          this._preloadBrowserIdleObserver = (aSubject, aTopic) => {
-            if (aTopic != "idle") {
-              return;
-            }
-
-            Services.idle.removeIdleObserver(this._preloadBrowserIdleObserver,
-                                             this._preloadBrowserMinUserIdleSeconds);
-            this._preloadBrowserIdleObserver = null;
-
-            let idleCallback = deadline => {
-              if (deadline.timeRemaining() < this._preloadBrowserMinIdlePeriodMs) {
-                window.requestIdleCallback(idleCallback);
-              } else {
-                this._createPreloadBrowser();
-              }
-            };
-            window.requestIdleCallback(idleCallback);
-          };
-          Services.idle.addIdleObserver(this._preloadBrowserIdleObserver, this._preloadBrowserMinUserIdleSeconds);
-        ]]></body>
-      </method>
-
       <method name="_createPreloadBrowser">
         <body>
           <![CDATA[
             // Do nothing if we have a preloaded browser already
             // or preloading of newtab pages is disabled.
             if (this._preloadedBrowser || !this._isPreloadingEnabled()) {
               return;
             }
 
-            if (this._preloadBrowserIdleObserver) {
-              Services.idle.removeIdleObserver(this._preloadBrowserIdleObserver,
-                                               this._preloadBrowserMinUserIdleSeconds);
-              this._preloadBrowserIdleObserver = null;
-            }
-
             let remoteType =
               E10SUtils.getRemoteTypeForURI(BROWSER_NEW_TAB_URL,
                                             gMultiProcessBrowser);
             let browser = this._createBrowser({isPreloadBrowser: true, remoteType});
             this._preloadedBrowser = browser;
 
             let notificationbox = this.getNotificationBox(browser);
             this.mPanelContainer.appendChild(notificationbox);
@@ -5889,22 +5849,16 @@
             window.messageManager.removeMessageListener("contextmenu", this);
 
             if (this._switcher) {
               this._switcher.destroy();
             }
           }
 
           Services.prefs.removeObserver("accessibility.typeaheadfind", this);
-
-          if (this._preloadBrowserIdleObserver) {
-            Services.idle.removeIdleObserver(this._preloadBrowserIdleObserver,
-                                             this._preloadBrowserMinUserIdleSeconds);
-            this._preloadBrowserIdleObserver = null;
-          }
         ]]>
       </destructor>
 
       <field name="_soundPlayingAttrRemovalTimer">0</field>
       <field name="_hoverTabTimer">null</field>
     </implementation>
 
     <handlers>
@@ -6966,17 +6920,17 @@
           // XXXmano: this is a temporary workaround for bug 345399
           // We need to manually update the scroll buttons disabled state
           // if a tab was inserted to the overflow area or removed from it
           // without any scrolling and when the tabbar has already
           // overflowed.
           this.mTabstrip._updateScrollButtonsDisabledState();
 
           // Preload the next about:newtab if there isn't one already.
-          this.tabbrowser.requestPreloadBrowser();
+          this.tabbrowser._createPreloadBrowser();
         ]]></body>
       </method>
 
       <method name="_canAdvanceToTab">
         <parameter name="aTab"/>
         <body>
         <![CDATA[
           return !aTab.closing;
--- a/toolkit/modules/Services.jsm
+++ b/toolkit/modules/Services.jsm
@@ -72,17 +72,16 @@ var initTable = {
   cache2: ["@mozilla.org/netwerk/cache-storage-service;1", "nsICacheStorageService"],
   cpmm: ["@mozilla.org/childprocessmessagemanager;1", "nsIMessageSender"],
   console: ["@mozilla.org/consoleservice;1", "nsIConsoleService"],
   cookies: ["@mozilla.org/cookiemanager;1", "nsICookieManager2"],
   downloads: ["@mozilla.org/download-manager;1", "nsIDownloadManager"],
   droppedLinkHandler: ["@mozilla.org/content/dropped-link-handler;1", "nsIDroppedLinkHandler"],
   els: ["@mozilla.org/eventlistenerservice;1", "nsIEventListenerService"],
   eTLD: ["@mozilla.org/network/effective-tld-service;1", "nsIEffectiveTLDService"],
-  idle: ["@mozilla.org/widget/idleservice;1", "nsIIdleService"],
   intl: ["@mozilla.org/mozintl;1", "mozIMozIntl"],
   locale: ["@mozilla.org/intl/localeservice;1", "mozILocaleService"],
   logins: ["@mozilla.org/login-manager;1", "nsILoginManager"],
   obs: ["@mozilla.org/observer-service;1", "nsIObserverService"],
   perms: ["@mozilla.org/permissionmanager;1", "nsIPermissionManager"],
   prompt: ["@mozilla.org/embedcomp/prompt-service;1", "nsIPromptService"],
   scriptloader: ["@mozilla.org/moz/jssubscript-loader;1", "mozIJSSubScriptLoader"],
   scriptSecurityManager: ["@mozilla.org/scriptsecuritymanager;1", "nsIScriptSecurityManager"],
--- a/toolkit/modules/tests/xpcshell/test_Services.js
+++ b/toolkit/modules/tests/xpcshell/test_Services.js
@@ -37,17 +37,16 @@ function run_test() {
   checkService("dirsvc", Ci.nsIDirectoryService);
   checkService("dirsvc", Ci.nsIProperties);
   checkService("DOMRequest", Ci.nsIDOMRequestService);
   checkService("domStorageManager", Ci.nsIDOMStorageManager);
   checkService("downloads", Ci.nsIDownloadManager);
   checkService("droppedLinkHandler", Ci.nsIDroppedLinkHandler);
   checkService("eTLD", Ci.nsIEffectiveTLDService);
   checkService("focus", Ci.nsIFocusManager);
-  checkService("idle", Ci.nsIIdleService);
   checkService("io", Ci.nsIIOService);
   checkService("io", Ci.nsIIOService2);
   checkService("intl", Ci.mozIMozIntl);
   checkService("locale", Ci.mozILocaleService);
   checkService("logins", Ci.nsILoginManager);
   checkService("obs", Ci.nsIObserverService);
   checkService("perms", Ci.nsIPermissionManager);
   checkService("prefs", Ci.nsIPrefBranch);