Merge mozilla-central to autoland. a=merge
authorDaniel Varga <dvarga@mozilla.com>
Wed, 10 Oct 2018 13:55:13 +0300
changeset 496170 08d597127e937fbcb9f2929c6cd772ed93bfd7d9
parent 496169 003208b2dd175a1ecd16a9a781011c115a3d7d06 (current diff)
parent 496158 91b4c3687d7563244fbba0f58075779eb89259fb (diff)
child 496171 baa2b88b3ed1cd04fbae4d7ec20124c4ee2b87e6
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)
reviewersmerge
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
Merge mozilla-central to autoland. a=merge
--- a/browser/base/content/test/performance/browser_preferences_usage.js
+++ b/browser/base/content/test/performance/browser_preferences_usage.js
@@ -1,13 +1,11 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
-const DEFAULT_PROCESS_COUNT = Services.prefs.getDefaultBranch(null).getIntPref("dom.ipc.processCount");
-
 /**
  * A test that checks whether any preference getter from the given list
  * of stats was called more often than the max parameter.
  *
  * @param {Array}  stats - an array of [prefName, accessCount] tuples
  * @param {Number} max - the maximum number of times any of the prefs should
  *                 have been called.
  * @param {Object} whitelist (optional) - an object that defines
@@ -117,20 +115,17 @@ add_task(async function startup() {
 
   ok(startupRecorder.data.prefStats, "startupRecorder has prefStats");
 
   checkPrefGetters(startupRecorder.data.prefStats, max, whitelist);
 });
 
 // This opens 10 tabs and checks pref getters.
 add_task(async function open_10_tabs() {
-  // This is somewhat arbitrary. When we had a default of 4 content processes
-  // the value was 15. We need to scale it as we increase the number of
-  // content processes so we approximate with 4 * process_count.
-  const max = 4 * DEFAULT_PROCESS_COUNT;
+  let max = 15;
 
   let whitelist = {
     "layout.css.dpi": {
       max: 35,
     },
     "browser.zoom.full": {
       min: 10,
       max: 25,
@@ -146,16 +141,20 @@ add_task(async function open_10_tabs() {
     "security.insecure_connection_text.enabled": {
       min: 10,
       max: 18,
     },
     "security.insecure_connection_text.pbmode.enabled": {
       min: 10,
       max: 18,
     },
+    "dom.ipc.processCount": {
+      min: 10,
+      max: 15,
+    },
     "browser.startup.record": {
       max: 20,
     },
     "browser.tabs.remote.logSwitchTiming": {
       max: 25,
     },
     "network.loadinfo.skip_type_assertion": {
       // This is accessed in debug only.
--- a/browser/components/extensions/test/browser/browser_ext_slow_script.js
+++ b/browser/components/extensions/test/browser/browser_ext_slow_script.js
@@ -1,28 +1,26 @@
 /* -*- 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", DEFAULT_PROCESS_COUNT * 2],
+      ["dom.ipc.processCount", 8],
       ["dom.ipc.processPrelaunch.enabled", false],
       ["dom.ipc.reportProcessHangs", true],
     ],
   });
 
   let extension = ExtensionTestUtils.loadExtension({
     useAddonManager: "temporary",
 
--- a/browser/components/preferences/in-content/main.xul
+++ b/browser/components/preferences/in-content/main.xul
@@ -608,17 +608,16 @@
         <menupopup>
           <menuitem label="1" value="1"/>
           <menuitem label="2" value="2"/>
           <menuitem label="3" value="3"/>
           <menuitem label="4" value="4"/>
           <menuitem label="5" value="5"/>
           <menuitem label="6" value="6"/>
           <menuitem label="7" value="7"/>
-          <menuitem label="8" value="8"/>
         </menupopup>
       </menulist>
     </hbox>
     <description id="contentProcessCountEnabledDescription" class="tip-caption" data-l10n-id="performance-limit-content-process-enabled-desc"/>
     <description id="contentProcessCountDisabledDescription" class="tip-caption" data-l10n-id="performance-limit-content-process-blocked-desc">
       <html:a class="text-link" data-l10n-name="learn-more" href="https://wiki.mozilla.org/Electrolysis"/>
     </description>
   </vbox>
--- a/browser/components/preferences/in-content/tests/browser_performance_e10srollout.js
+++ b/browser/components/preferences/in-content/tests/browser_performance_e10srollout.js
@@ -39,32 +39,30 @@ add_task(async function testPrefsAreDefa
 
   BrowserTestUtils.removeTab(gBrowser.selectedTab);
 
   Services.prefs.clearUserPref("dom.ipc.processCount");
   Services.prefs.setBoolPref("browser.preferences.defaultPerformanceSettings.enabled", true);
 });
 
 add_task(async function testPrefsSetByUser() {
-  const kNewCount = DEFAULT_PROCESS_COUNT - 2;
-
-  Services.prefs.setIntPref("dom.ipc.processCount", kNewCount);
+  Services.prefs.setIntPref("dom.ipc.processCount", DEFAULT_PROCESS_COUNT + 2);
   Services.prefs.setBoolPref("browser.preferences.defaultPerformanceSettings.enabled", false);
 
   let prefs = await openPreferencesViaOpenPreferencesAPI("paneGeneral", {leaveOpen: true});
   is(prefs.selectedPane, "paneGeneral", "General pane was selected");
 
   let doc = gBrowser.contentDocument;
   let performanceSettings = doc.querySelector("#performanceSettings");
   is(performanceSettings.hidden, false, "performance settings section is shown");
 
   let contentProcessCount = doc.querySelector("#contentProcessCount");
   is(contentProcessCount.disabled, false, "process count control should be enabled");
-  is(Services.prefs.getIntPref("dom.ipc.processCount"), kNewCount, "process count should be the set value");
-  is(contentProcessCount.selectedItem.value, kNewCount, "selected item should be the set one");
+  is(Services.prefs.getIntPref("dom.ipc.processCount"), DEFAULT_PROCESS_COUNT + 2, "process count should be the set value");
+  is(contentProcessCount.selectedItem.value, DEFAULT_PROCESS_COUNT + 2, "selected item should be the set one");
 
   let useRecommendedPerformanceSettings = doc.querySelector("#useRecommendedPerformanceSettings");
   useRecommendedPerformanceSettings.click();
 
   is(Services.prefs.getBoolPref("browser.preferences.defaultPerformanceSettings.enabled"), true,
     "pref value should be true after clicking on checkbox");
   is(Services.prefs.getIntPref("dom.ipc.processCount"), DEFAULT_PROCESS_COUNT,
     "process count should be default value");
--- a/dom/base/test/browser_force_process_selector.js
+++ b/dom/base/test/browser_force_process_selector.js
@@ -1,20 +1,23 @@
 "use strict";
 
 const CONTENT_CREATED = "ipc:content-created";
 
 // Make sure that BTU.withNewTab({ ..., forceNewProcess: true }) loads
 // new tabs in their own process.
 async function spawnNewAndTest(recur, pids) {
+  let processCreated = TestUtils.topicObserved(CONTENT_CREATED);
   await BrowserTestUtils.withNewTab({ gBrowser, url: "about:blank", forceNewProcess: true },
                                     async function(browser) {
-      // Make sure our new browser is in its own process.
+      // Make sure our new browser is in its own process. The processCreated
+      // promise should have already resolved by this point.
+      await processCreated;
       let newPid = browser.frameLoader.tabParent.osPid;
-      ok(!pids.has(newPid), "new tab is in its own process: " + recur);
+      ok(!pids.has(newPid), "new tab is in its own process");
       pids.add(newPid);
 
       if (recur) {
         await spawnNewAndTest(recur - 1, pids);
       } else {
         let observer = () => {
           ok(false, "shouldn't have created a new process");
         };
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -3279,21 +3279,17 @@ pref("dom.ipc.plugins.reportCrashURL", t
 pref("dom.ipc.plugins.unloadTimeoutSecs", 30);
 
 // Allow Flash async drawing mode in 64-bit release builds
 pref("dom.ipc.plugins.asyncdrawing.enabled", true);
 // Force the accelerated direct path for a subset of Flash wmode values
 pref("dom.ipc.plugins.forcedirect.enabled", true);
 
 // Enable multi by default.
-#if defined(NIGHTLY_BUILD)
-pref("dom.ipc.processCount", 8);
-#else
 pref("dom.ipc.processCount", 4);
-#endif
 
 // Default to allow only one file:// URL content process.
 pref("dom.ipc.processCount.file", 1);
 
 // WebExtensions only support a single extension process.
 pref("dom.ipc.processCount.extension", 1);
 
 // Privileged content only supports a single content process.