Backed out changeset 5d97da3c65b5 (bug 1548941) for Valgrind failure
authorDorel Luca <dluca@mozilla.com>
Tue, 07 May 2019 02:36:13 +0300
changeset 534680 4574274db3f95575dca7da08e16d6f20242fcb2a
parent 534679 d2d67ffc31fcaab22a60feb8394a3d01ab7ce52d
child 534681 ae79b7fca45dc376e7f024da7f1ca84d81062868
push id2082
push userffxbld-merge
push dateMon, 01 Jul 2019 08:34:18 +0000
treeherdermozilla-release@2fb19d0466d2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1548941
milestone68.0a1
backs out5d97da3c65b5376c9bc6df4add1646fc63937693
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
Backed out changeset 5d97da3c65b5 (bug 1548941) for Valgrind failure
toolkit/xre/nsAppRunner.cpp
--- 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, removed when ending non-e10s support
+  kE10sEnabledByUser = 0,
   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;
   }
 
-#if defined(MOZILLA_OFFICIAL) && MOZ_BUILD_APP_IS_BROWSER
-  bool allowSingleProcessOutsideAutomation = false;
-#else
-  bool allowSingleProcessOutsideAutomation = true;
-#endif
-
+  bool optInPref = Preferences::GetBool("browser.tabs.remote.autostart", true);
   int status = kE10sEnabledByDefault;
-  if (allowSingleProcessOutsideAutomation || xpc::IsInAutomation()) {
-    bool optInPref = Preferences::GetBool("browser.tabs.remote.autostart", true);
-
-    if (optInPref) {
-      gBrowserTabsRemoteAutostart = true;
-    } else {
-      status = kE10sDisabledByUser;
-    }
+
+  if (optInPref) {
+    gBrowserTabsRemoteAutostart = true;
   } 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 &&
-      EnvHasValue("MOZ_FORCE_DISABLE_E10S")) {
+      (Preferences::GetBool(kForceDisableE10sPref, false) ||
+       EnvHasValue("MOZ_FORCE_DISABLE_E10S"))) {
     gBrowserTabsRemoteAutostart = false;
     status = kE10sForceDisabled;
   }
 
   gBrowserTabsRemoteStatus = status;
 
   return gBrowserTabsRemoteAutostart;
 }