Bug 1470280 - Part 3: Use the default process count in browser_ext_slow_script.js. r=kmag
authorEric Rahm <erahm@mozilla.com>
Sat, 06 Oct 2018 12:53:41 -0700
changeset 499103 b9f6938813567a1180a109f8b00997d3b6d47508
parent 499102 084f2ef96e42792ab5236ea41a23cb924d56e293
child 499104 b9b91fd9b3f07d1d832208445258baa5aa04275a
push id1864
push userffxbld-merge
push dateMon, 03 Dec 2018 15:51:40 +0000
treeherdermozilla-release@f040763d99ad [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",