Bug 1596609 - Make more tests reuse Fission content processes. r=kmag draft
authorAndrew McCreight <continuation@gmail.com>
Thu, 14 Nov 2019 15:54:11 -0800
changeset 2496057 8c66b0d86e9750b328840fcfe7f58a6c3ebbc03d
parent 2496056 9397a92019d87b3117bbf8520e882e957ea00073
child 2496058 f57bbf975cc436516f7dfaf747ebeb90a8cf56f2
push id455279
push useramccreight@mozilla.com
push dateMon, 25 Nov 2019 19:56:04 +0000
treeherdertry@59b13b57567a [default view] [failures only]
reviewerskmag
bugs1596609, 1596611
milestone72.0a1
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