summaryrefslogtreecommitdiffstats
path: root/toolkit/xre
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2019-06-07 12:40:36 +0200
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-06-07 12:40:36 +0200
commit19c0f5e9ff625c6a67e5e0a08f0a800782168492 (patch)
tree1a22e9a38d845fb37a8c845a57db6f5ccb239ffa /toolkit/xre
parent3f1ef7a67d42d5dfd93088d74480222e781e3840 (diff)
downloadUXP-19c0f5e9ff625c6a67e5e0a08f0a800782168492.tar
UXP-19c0f5e9ff625c6a67e5e0a08f0a800782168492.tar.gz
UXP-19c0f5e9ff625c6a67e5e0a08f0a800782168492.tar.lz
UXP-19c0f5e9ff625c6a67e5e0a08f0a800782168492.tar.xz
UXP-19c0f5e9ff625c6a67e5e0a08f0a800782168492.zip
Remove e10s force-enable/-disable prefs and a11y considerations for
starting in e10s mode. This resolves #1130
Diffstat (limited to 'toolkit/xre')
-rw-r--r--toolkit/xre/nsAppRunner.cpp79
1 files changed, 3 insertions, 76 deletions
diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp
index 4ae70fd43..5a51fd3e7 100644
--- a/toolkit/xre/nsAppRunner.cpp
+++ b/toolkit/xre/nsAppRunner.cpp
@@ -4232,9 +4232,6 @@ PRTimeToSeconds(PRTime t_usec)
}
#endif
-const char* kForceEnableE10sPref = "browser.tabs.remote.force-enable";
-const char* kForceDisableE10sPref = "browser.tabs.remote.force-disable";
-
uint32_t
MultiprocessBlockPolicy() {
if (gMultiprocessBlockPolicyInitialized) {
@@ -4242,50 +4239,6 @@ MultiprocessBlockPolicy() {
}
gMultiprocessBlockPolicyInitialized = true;
- /**
- * Avoids enabling e10s if there are add-ons installed.
- */
- bool addonsCanDisable = Preferences::GetBool("extensions.e10sBlocksEnabling", false);
- bool disabledByAddons = Preferences::GetBool("extensions.e10sBlockedByAddons", false);
-
- if (addonsCanDisable && disabledByAddons) {
- gMultiprocessBlockPolicy = kE10sDisabledForAddons;
- }
-
-#if defined(XP_WIN)
- bool disabledForA11y = false;
- /**
- * Avoids enabling e10s if accessibility has recently loaded. Performs the
- * following checks:
- * 1) Checks a pref indicating if a11y loaded in the last session. This pref
- * is set in nsBrowserGlue.js. If a11y was loaded in the last session we
- * do not enable e10s in this session.
- * 2) Accessibility stores a last run date (PR_IntervalNow) when it is
- * initialized (see nsBaseWidget.cpp). We check if this pref exists and
- * compare it to now. If a11y hasn't run in an extended period of time or
- * if the date pref does not exist we load e10s.
- */
- disabledForA11y = Preferences::GetBool(kAccessibilityLoadedLastSessionPref, false);
- if (!disabledForA11y &&
- Preferences::HasUserValue(kAccessibilityLastRunDatePref)) {
- #define ONE_WEEK_IN_SECONDS (60*60*24*7)
- uint32_t a11yRunDate = Preferences::GetInt(kAccessibilityLastRunDatePref, 0);
- MOZ_ASSERT(0 != a11yRunDate);
- // If a11y hasn't run for a period of time, clear the pref and load e10s
- uint32_t now = PRTimeToSeconds(PR_Now());
- uint32_t difference = now - a11yRunDate;
- if (difference > ONE_WEEK_IN_SECONDS || !a11yRunDate) {
- Preferences::ClearUser(kAccessibilityLastRunDatePref);
- } else {
- disabledForA11y = true;
- }
- }
-
- if (disabledForA11y) {
- gMultiprocessBlockPolicy = kE10sDisabledForAccessibility;
- }
-#endif
-
// We do not support E10S, block by policy.
gMultiprocessBlockPolicy = kE10sForceDisabled;
@@ -4300,46 +4253,20 @@ mozilla::BrowserTabsRemoteAutostart()
}
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", false);
bool trialPref = Preferences::GetBool("browser.tabs.remote.autostart.2", false);
bool prefEnabled = optInPref || trialPref;
int status;
- if (optInPref) {
- status = kE10sEnabledByUser;
- } else if (trialPref) {
- status = kE10sEnabledByDefault;
- } else {
- status = kE10sDisabledByUser;
- }
if (prefEnabled) {
uint32_t blockPolicy = MultiprocessBlockPolicy();
if (blockPolicy != 0) {
status = blockPolicy;
} else {
- gBrowserTabsRemoteAutostart = true;
+ MOZ_CRASH("e10s force enabled bypassing policy -- unsupported configuration");
}
- }
-
- // Uber override pref for manual testing purposes
- if (Preferences::GetBool(kForceEnableE10sPref, false)) {
- gBrowserTabsRemoteAutostart = true;
- prefEnabled = true;
- status = kE10sEnabledByUser;
- }
-
- // Uber override pref for emergency blocking
- if (gBrowserTabsRemoteAutostart &&
- (Preferences::GetBool(kForceDisableE10sPref, false) ||
- EnvHasValue("MOZ_FORCE_DISABLE_E10S"))) {
- gBrowserTabsRemoteAutostart = false;
- status = kE10sForceDisabled;
+ } else {
+ status = kE10sDisabledByUser;
}
gBrowserTabsRemoteStatus = status;