Bug 1596609 - Make more tests reuse Fission content processes. r=kmag
authorAndrew McCreight <continuation@gmail.com>
Mon, 18 Nov 2019 21:55:08 +0000
changeset 502485 9f82401f147b1c20e45ec757ed2e6221a720e88d
parent 502484 635be62762b9f8fa94f3cb38e81d356a6b8f22bb
child 502486 561598bb2f394a1301650aa606df06cb310cdaac
push id114172
push userdluca@mozilla.com
push dateTue, 19 Nov 2019 11:31:10 +0000
treeherdermozilla-inbound@b5c5ba07d3db [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskmag
bugs1596609, 1596611
milestone72.0a1
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
Bug 1596609 - Make more tests reuse Fission content processes. r=kmag These tests are frequently leaking a single BackstagePass and its XPCWN. To paper over the leak, this patch makes us reuse Fission content processes in a few places. I filed bug 1596611 about fixing the leak and reverting the change. Differential Revision: https://phabricator.services.mozilla.com/D53108
browser/base/content/test/tabs/browser.ini
browser/components/privatebrowsing/test/browser/browser_privatebrowsing_geoprompt.js
browser/components/uitour/test/browser.ini
--- a/browser/base/content/test/tabs/browser.ini
+++ b/browser/base/content/test/tabs/browser.ini
@@ -1,9 +1,14 @@
 [DEFAULT]
+prefs =
+    # With Fission enabled, this directory spawns many child processes, which
+    # somehow results in frequent shutdown leaks. Reuse the content processes
+    # to avoid this.
+    dom.ipc.keepProcessesAlive.webIsolated.perOrigin=1
 support-files =
   head.js
   dummy_page.html
   ../general/audio.ogg
   file_mediaPlayback.html
   test_process_flags_chrome.html
 
 [browser_accessibility_indicator.js]
--- a/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_geoprompt.js
+++ b/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_geoprompt.js
@@ -1,15 +1,23 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 // This test makes sure that the geolocation prompt does not show a remember
 // control inside the private browsing mode.
 
+// This test leaks intermittently with Fission. Make it behave more like
+// non-Fission e10s tests to try to avoid them.
+add_task(async function setup() {
+  await SpecialPowers.pushPrefEnv({
+    set: [["dom.ipc.keepProcessesAlive.webIsolated.perOrigin", 1]],
+  });
+});
+
 add_task(async function test() {
   const testPageURL =
     "https://example.com/browser/" +
     "browser/components/privatebrowsing/test/browser/browser_privatebrowsing_geoprompt_page.html";
 
   function checkGeolocation(aPrivateMode, aWindow) {
     return (async function() {
       aWindow.gBrowser.selectedTab = BrowserTestUtils.addTab(
--- a/browser/components/uitour/test/browser.ini
+++ b/browser/components/uitour/test/browser.ini
@@ -1,12 +1,12 @@
 [DEFAULT]
 prefs =
     # With Fission enabled, this directory spawns many child processes, which
-    # somehow results in frequent leaks shutdown hangs. Reuse the content
+    # somehow results in frequent shutdown leaks and hangs. Reuse the content
     # processes to avoid this.
     dom.ipc.keepProcessesAlive.webIsolated.perOrigin=1
 support-files =
   head.js
   image.png
   uitour.html
   ../UITour-lib.js