Bug 1548941 - remove e10s force-enable and force-disable prefs, and on desktop restrict 'normal' e10s pref to automation and unofficial builds, r=bholley,ahal
☠☠ backed out by 0313ad8713b5 ☠ ☠
authorGijs Kruitbosch <gijskruitbosch@gmail.com>
Wed, 08 May 2019 15:56:53 +0000
changeset 473090 4e2250bbaed37b7b0a9a2c4b66c0c5455a1551a6
parent 473089 3429489885f855dc1658504c7d3b91de52446e3f
child 473091 7e1942ace2b27c0905642f3c2ea83c848ba947b1
push id113065
push useropoprus@mozilla.com
push dateThu, 09 May 2019 03:46:59 +0000
treeherdermozilla-inbound@34a824c75b7b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbholley, ahal
bugs1548941
milestone68.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 1548941 - remove e10s force-enable and force-disable prefs, and on desktop restrict 'normal' e10s pref to automation and unofficial builds, r=bholley,ahal Differential Revision: https://phabricator.services.mozilla.com/D29892
build/valgrind/mach_commands.py
toolkit/xre/nsAppRunner.cpp
--- a/build/valgrind/mach_commands.py
+++ b/build/valgrind/mach_commands.py
@@ -96,16 +96,17 @@ class MachCommands(MachCommandBase):
                                      locations=locations)
 
             firefox_args = [httpd.get_url()]
 
             env = os.environ.copy()
             env['G_SLICE'] = 'always-malloc'
             env['MOZ_CC_RUN_DURING_SHUTDOWN'] = '1'
             env['MOZ_CRASHREPORTER_NO_REPORT'] = '1'
+            env['MOZ_DISABLE_NONLOCAL_CONNECTIONS'] = '1'
             env['XPCOM_DEBUG_BREAK'] = 'warn'
 
             env.update(self.extra_environment_variables)
 
             outputHandler = OutputHandler(self.log)
             kp_kwargs = {'processOutputLine': [outputHandler]}
 
             valgrind = 'valgrind'
--- a/toolkit/xre/nsAppRunner.cpp
+++ b/toolkit/xre/nsAppRunner.cpp
@@ -4902,65 +4902,65 @@ bool XRE_Win32kCallsAllowed() {
     default:
       return true;
   }
 }
 #endif
 
 // If you add anything to this enum, please update about:support to reflect it
 enum {
-  kE10sEnabledByUser = 0,
+  // kE10sEnabledByUser = 0, removed when ending non-e10s support
   kE10sEnabledByDefault = 1,
   kE10sDisabledByUser = 2,
   // kE10sDisabledInSafeMode = 3, was removed in bug 1172491.
   // kE10sDisabledForAccessibility = 4,
   // kE10sDisabledForMacGfx = 5, was removed in bug 1068674.
   // kE10sDisabledForBidi = 6, removed in bug 1309599
   // kE10sDisabledForAddons = 7, removed in bug 1406212
   kE10sForceDisabled = 8,
   // kE10sDisabledForXPAcceleration = 9, removed in bug 1296353
   // kE10sDisabledForOperatingSystem = 10, removed due to xp-eol
 };
 
-const char* kForceEnableE10sPref = "browser.tabs.remote.force-enable";
-const char* kForceDisableE10sPref = "browser.tabs.remote.force-disable";
-
 namespace mozilla {
 
 bool BrowserTabsRemoteAutostart() {
   if (gBrowserTabsRemoteAutostartInitialized) {
     return gBrowserTabsRemoteAutostart;
   }
   gBrowserTabsRemoteAutostartInitialized = true;
 
   // If we're in the content process, we are running E10S.
   if (XRE_IsContentProcess()) {
     gBrowserTabsRemoteAutostart = true;
     return gBrowserTabsRemoteAutostart;
   }
 
-  bool optInPref = Preferences::GetBool("browser.tabs.remote.autostart", true);
+#if defined(MOZILLA_OFFICIAL) && MOZ_BUILD_APP_IS_BROWSER
+  bool allowSingleProcessOutsideAutomation = false;
+#else
+  bool allowSingleProcessOutsideAutomation = true;
+#endif
+
   int status = kE10sEnabledByDefault;
-
-  if (optInPref) {
-    gBrowserTabsRemoteAutostart = true;
+  if (allowSingleProcessOutsideAutomation || xpc::IsInAutomation()) {
+    bool optInPref =
+        Preferences::GetBool("browser.tabs.remote.autostart", true);
+
+    if (optInPref) {
+      gBrowserTabsRemoteAutostart = true;
+    } else {
+      status = kE10sDisabledByUser;
+    }
   } else {
-    status = kE10sDisabledByUser;
-  }
-
-  // Uber override pref for manual testing purposes
-  if (Preferences::GetBool(kForceEnableE10sPref, false)) {
     gBrowserTabsRemoteAutostart = true;
-    status = kE10sEnabledByUser;
   }
 
   // Uber override pref for emergency blocking
-  if (gBrowserTabsRemoteAutostart &&
-      (Preferences::GetBool(kForceDisableE10sPref, false) ||
-       EnvHasValue("MOZ_FORCE_DISABLE_E10S"))) {
+  if (gBrowserTabsRemoteAutostart && EnvHasValue("MOZ_FORCE_DISABLE_E10S")) {
     gBrowserTabsRemoteAutostart = false;
     status = kE10sForceDisabled;
   }
 
   gBrowserTabsRemoteStatus = status;
 
   return gBrowserTabsRemoteAutostart;
 }