diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-06-07 12:40:36 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-06-07 12:40:36 +0200 |
commit | 19c0f5e9ff625c6a67e5e0a08f0a800782168492 (patch) | |
tree | 1a22e9a38d845fb37a8c845a57db6f5ccb239ffa | |
parent | 3f1ef7a67d42d5dfd93088d74480222e781e3840 (diff) | |
download | UXP-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
-rw-r--r-- | dom/ipc/ContentParent.cpp | 17 | ||||
-rw-r--r-- | toolkit/xre/nsAppRunner.cpp | 79 |
2 files changed, 3 insertions, 93 deletions
diff --git a/dom/ipc/ContentParent.cpp b/dom/ipc/ContentParent.cpp index 79446151c..97e3a4880 100644 --- a/dom/ipc/ContentParent.cpp +++ b/dom/ipc/ContentParent.cpp @@ -229,11 +229,6 @@ static NS_DEFINE_CID(kCClipboardCID, NS_CLIPBOARD_CID); -#if defined(XP_WIN) -// e10s forced enable pref, defined in nsAppRunner.cpp -extern const char* kForceEnableE10sPref; -#endif - using base::ChildPrivileges; using base::KillProcess; @@ -1275,12 +1270,6 @@ ContentParent::Init() if (nsIPresShell::IsAccessibilityActive()) { #if !defined(XP_WIN) Unused << SendActivateA11y(0); -#else - // On Windows we currently only enable a11y in the content process - // for testing purposes. - if (Preferences::GetBool(kForceEnableE10sPref, false)) { - Unused << SendActivateA11y(a11y::AccessibleWrap::GetContentProcessIdFor(ChildID())); - } #endif } #endif @@ -2573,12 +2562,6 @@ ContentParent::Observe(nsISupports* aSubject, // accessibility gets initiated in chrome process. #if !defined(XP_WIN) Unused << SendActivateA11y(0); -#else - // On Windows we currently only enable a11y in the content process - // for testing purposes. - if (Preferences::GetBool(kForceEnableE10sPref, false)) { - Unused << SendActivateA11y(a11y::AccessibleWrap::GetContentProcessIdFor(ChildID())); - } #endif } else { // If possible, shut down accessibility in content process when 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; |