Bug 1653384: Require MOZ_FORCE_DISABLE_E10S to be set to the current application version. r=froydnj
authorDave Townsend <dtownsend@oxymoronical.com>
Thu, 06 Aug 2020 18:16:33 +0000
changeset 543634 13171155d5e5586e0452449161ef63958434e1b1
parent 543633 7b7c69e7525e0d12fe861b30da3910c71ef8a3b1
child 543635 4110afa01ff5662f9bd9ff85ce1e91bf88bb2d2f
push id37676
push usercbrindusan@mozilla.com
push dateThu, 06 Aug 2020 21:54:39 +0000
treeherdermozilla-central@95cbd1379138 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1653384
milestone81.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 1653384: Require MOZ_FORCE_DISABLE_E10S to be set to the current application version. r=froydnj Depends on D86240 Differential Revision: https://phabricator.services.mozilla.com/D86241
toolkit/xre/nsAppRunner.cpp
--- a/toolkit/xre/nsAppRunner.cpp
+++ b/toolkit/xre/nsAppRunner.cpp
@@ -5156,19 +5156,23 @@ bool BrowserTabsRemoteAutostart() {
     } else {
       status = kE10sDisabledByUser;
     }
   } else {
     gBrowserTabsRemoteAutostart = true;
   }
 
   // Uber override pref for emergency blocking
-  if (gBrowserTabsRemoteAutostart && EnvHasValue("MOZ_FORCE_DISABLE_E10S")) {
-    gBrowserTabsRemoteAutostart = false;
-    status = kE10sForceDisabled;
+  if (gBrowserTabsRemoteAutostart) {
+    const char* forceDisable = PR_GetEnv("MOZ_FORCE_DISABLE_E10S");
+    // The environment variable must match the application version to apply.
+    if (forceDisable && !strcmp(forceDisable, gAppData->version)) {
+      gBrowserTabsRemoteAutostart = false;
+      status = kE10sForceDisabled;
+    }
   }
 
   gBrowserTabsRemoteStatus = status;
 
   return gBrowserTabsRemoteAutostart;
 }
 
 bool FissionAutostart() {