Skip to content

Commit 9f485ee

Browse files
committed
Ability to disable e10s part 1
1 parent 04e85bd commit 9f485ee

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

toolkit/xre/nsAppRunner.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -548,6 +548,7 @@ enum E10sStatus {
548548
static bool gBrowserTabsRemoteAutostart = false;
549549
static E10sStatus gBrowserTabsRemoteStatus;
550550
static bool gBrowserTabsRemoteAutostartInitialized = false;
551+
const char* kForceDisableE10sPref = "browser.e10s.disabled";
551552

552553
namespace mozilla {
553554

@@ -572,12 +573,11 @@ bool BrowserTabsRemoteAutostart() {
572573
// they are not in (at least) gtests (where we can't) and xpcshell.
573574
// Long-term, hopefully we can make all tests e10s-friendly,
574575
// then we could remove this automation-only env variable.
575-
if (gBrowserTabsRemoteAutostart && xpc::AreNonLocalConnectionsDisabled()) {
576-
const char* forceDisable = PR_GetEnv("MOZ_FORCE_DISABLE_E10S");
577-
if (forceDisable && !strcmp(forceDisable, "1")) {
578-
gBrowserTabsRemoteAutostart = false;
579-
status = kE10sForceDisabled;
580-
}
576+
if (gBrowserTabsRemoteAutostart &&
577+
(Preferences::GetBool(kForceDisableE10sPref, false) ||
578+
EnvHasValue("MOZ_FORCE_DISABLE_E10S"))) {
579+
gBrowserTabsRemoteAutostart = false;
580+
status = kE10sForceDisabled;
581581
}
582582

583583
gBrowserTabsRemoteStatus = status;

0 commit comments

Comments
 (0)