Bug 1535699 - Disable httpResponseProcessSelection on Fx67 for now. r=nika a=pascalc
authorAndrew Sutherland <asutherland@asutherland.org>
Mon, 13 May 2019 21:59:35 +0300
changeset 526542 fb5d546bb5b3c583a41225376e3e5a3674f90640
parent 526541 455c1065dcbe14b73771df2db56aae43a44dfcf8
child 526543 9faf017962724896d84b2c776454132beade33da
push id2033
push userapavel@mozilla.com
push dateMon, 13 May 2019 19:02:02 +0000
treeherdermozilla-release@fb5d546bb5b3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnika, pascalc
Bug 1535699 - Disable httpResponseProcessSelection on Fx67 for now. r=nika a=pascalc Summary: This change also alters the test we added in bug 1535699 so that if the http process selection pref is disabled and parent intercept is not enabled, we expect the page to not migrate out of the file process. Reviewers: nika Bug #: 1535699 Differential Revision: https://phabricator.services.mozilla.com/D30685
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -486,18 +486,21 @@ pref("browser.tabs.showAudioPlayingIcon"
 // This should match Chromium's audio indicator delay.
 pref("browser.tabs.delayHidingAudioPlayingIconMS", 3000);
 // Pref to control whether we use separate privileged content processes.
 #if defined(NIGHTLY_BUILD) && !defined(MOZ_ASAN)
 pref("browser.tabs.remote.separatePrivilegedContentProcess", true);
-// Turn on HTTP response process selection.
-pref("browser.tabs.remote.useHTTPResponseProcessSelection", true);
+// HTTP process selection which uses an advanced channel process switch
+// mechanism is disabled on release due to bug 1535699.  It can be re-enabled
+// again once the bug is fixed.  When disabled, a lesser form of process
+// switching is used.
+pref("browser.tabs.remote.useHTTPResponseProcessSelection", false);
 // Unload tabs when available memory is running low
 pref("browser.tabs.unloadOnLowMemory", true);
 pref("browser.ctrlTab.recentlyUsedOrder", true);
 // By default, do not export HTML at shutdown.
 // If true, at shutdown the bookmarks in your menu and toolbar will
--- a/dom/serviceworkers/test/browser_navigation_process_swap.js
+++ b/dom/serviceworkers/test/browser_navigation_process_swap.js
@@ -47,16 +47,23 @@ async function runTest() {
     'set': [
       ['dom.serviceWorkers.enabled', true],
       ['dom.serviceWorkers.exemptFromPerDomainMax', true],
       ['dom.serviceWorkers.testing.enabled', true],
       ['devtools.console.stdout.content', true],
+  const httpSwapEnabled =
+    SpecialPowers.getBoolPref(
+      "browser.tabs.remote.useHTTPResponseProcessSelection", true);
+  const parentIntercept =
+    SpecialPowers.getBoolPref(
+      "dom.serviceWorkers.parent_intercept", false);
   info(`Loading tab with page ${SW_REGISTER_PAGE_URL}`);
   const tab = await BrowserTestUtils.openNewForegroundTab({
     opening: SW_REGISTER_PAGE_URL,
   info(`Loaded page ${SW_REGISTER_PAGE_URL}`);
   info(`Registering Service Worker ${SW_SCRIPT_URL}`);
@@ -98,18 +105,26 @@ async function runTest() {
   info(`Waiting for location to change to ${CROSS_ORIGIN_URL}`);
   await redirectPromise;
   info('Waiting for the browser to stop')
   await BrowserTestUtils.browserStopped(tab.linkedBrowser);
-  Assert.equal(tab.linkedBrowser.remoteType, E10SUtils.WEB_REMOTE_TYPE,
-               `${CROSS_ORIGIN_URL} should load in a web-content process`);
+  if (httpSwapEnabled || parentIntercept) {
+    Assert.equal(tab.linkedBrowser.remoteType, E10SUtils.WEB_REMOTE_TYPE,
+                 `${CROSS_ORIGIN_URL} should load in a web-content process`);
+  } else {
+    // Because of child intercept the load will be served out of the file
+    // process if the channel itself doesn't trigger a process switch during
+    // redirect.
+    Assert.equal(tab.linkedBrowser.remoteType, E10SUtils.FILE_REMOTE_TYPE,
+                 `${CROSS_ORIGIN_URL} regrettably stays in the file process`);
+  }
   // Step 3: cleanup.
   info('Loading initial page to unregister all Service Workers');
   await loadURI(tab.linkedBrowser, SW_REGISTER_PAGE_URL);
   info('Unregistering all Service Workers');
   await ContentTask.spawn(