Bug 1470280 - Part 3: Use the default process count in browser_ext_slow_script.js. r=kmag
☠☠ backed out by 2d2dee08739f ☠ ☠
authorEric Rahm <erahm@mozilla.com>
Sat, 06 Oct 2018 12:53:41 -0700
changeset 496105 403c3d0daf6a24a7bb21e9f8ca2493cb4956fb4c
parent 496104 fe7ccd9fee7621782676d9bd841c144126e24c04
child 496106 72e7ef77480d0845ceabb5d3747a5523db6bda9d
push id9984
push userffxbld-merge
push dateMon, 15 Oct 2018 21:07:35 +0000
treeherdermozilla-beta@183d27ea8570 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskmag
bugs1470280
milestone64.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 1470280 - Part 3: Use the default process count in browser_ext_slow_script.js. r=kmag This updates the test to use a multiple of the default process count rather than hardcoding 8.
browser/components/extensions/test/browser/browser_ext_slow_script.js
--- a/browser/components/extensions/test/browser/browser_ext_slow_script.js
+++ b/browser/components/extensions/test/browser/browser_ext_slow_script.js
@@ -1,26 +1,28 @@
 /* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* vim: set sts=2 sw=2 et tw=80: */
 "use strict";
 
+const DEFAULT_PROCESS_COUNT = Services.prefs.getDefaultBranch(null).getIntPref("dom.ipc.processCount");
+
 add_task(async function test_slow_content_script() {
   // Make sure we get a new process for our tab, or our reportProcessHangs
   // preferences value won't apply to it.
   await SpecialPowers.pushPrefEnv({
     set: [
       ["dom.ipc.processCount", 1],
       ["dom.ipc.keepProcessesAlive.web", 0],
     ],
   });
   await SpecialPowers.popPrefEnv();
 
   await SpecialPowers.pushPrefEnv({
     set: [
-      ["dom.ipc.processCount", 8],
+      ["dom.ipc.processCount", DEFAULT_PROCESS_COUNT * 2],
       ["dom.ipc.processPrelaunch.enabled", false],
       ["dom.ipc.reportProcessHangs", true],
     ],
   });
 
   let extension = ExtensionTestUtils.loadExtension({
     useAddonManager: "temporary",