diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-08-18 16:25:15 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-08-18 16:26:16 +0200 |
commit | 202296d02aa99afa90581333ab059c050b9c3ade (patch) | |
tree | 6ed8a1289bed1bb06d2703ea77cba5fccd3bdffa /toolkit/xre | |
parent | 1530f48c27fb13d7cbd2708c9f0fcf2dabc6ed6a (diff) | |
parent | ab6242a93b849b0a3c7525b16bc01dd3172fc167 (diff) | |
download | UXP-202296d02aa99afa90581333ab059c050b9c3ade.tar UXP-202296d02aa99afa90581333ab059c050b9c3ade.tar.gz UXP-202296d02aa99afa90581333ab059c050b9c3ade.tar.lz UXP-202296d02aa99afa90581333ab059c050b9c3ade.tar.xz UXP-202296d02aa99afa90581333ab059c050b9c3ade.zip |
Pull Basilisk-release forward.
Diffstat (limited to 'toolkit/xre')
-rw-r--r-- | toolkit/xre/nsAppRunner.cpp | 96 |
1 files changed, 6 insertions, 90 deletions
diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp index 4ae70fd43..035d35a9d 100644 --- a/toolkit/xre/nsAppRunner.cpp +++ b/toolkit/xre/nsAppRunner.cpp @@ -2173,9 +2173,9 @@ SelectProfile(nsIProfileLock* *aResult, nsIToolkitProfileService* aProfileSvc, n return ShowProfileManager(aProfileSvc, aNative); } -#ifndef MOZ_DEV_EDITION - // If the only existing profile is the dev-edition-profile and this is not - // Developer Edition, then no valid profiles were found. + // Dev edition leftovers: + // If the only existing profile is the dev-edition-profile, + // then no valid profiles were found. if (count == 1) { nsCOMPtr<nsIToolkitProfile> deProfile; // GetSelectedProfile will auto-select the only profile if there's just one @@ -2186,7 +2186,6 @@ SelectProfile(nsIProfileLock* *aResult, nsIToolkitProfileService* aProfileSvc, n count = 0; } } -#endif if (!count) { gDoMigration = true; @@ -2195,25 +2194,15 @@ SelectProfile(nsIProfileLock* *aResult, nsIToolkitProfileService* aProfileSvc, n // create a default profile nsCOMPtr<nsIToolkitProfile> profile; nsresult rv = aProfileSvc->CreateProfile(nullptr, // choose a default dir for us -#ifdef MOZ_DEV_EDITION - NS_LITERAL_CSTRING("dev-edition-default"), -#else NS_LITERAL_CSTRING("default"), -#endif getter_AddRefs(profile)); if (NS_SUCCEEDED(rv)) { -#ifndef MOZ_DEV_EDITION aProfileSvc->SetDefaultProfile(profile); -#endif aProfileSvc->Flush(); rv = profile->Lock(nullptr, aResult); if (NS_SUCCEEDED(rv)) { if (aProfileName) -#ifdef MOZ_DEV_EDITION - aProfileName->AssignLiteral("dev-edition-default"); -#else aProfileName->AssignLiteral("default"); -#endif return NS_OK; } } @@ -4232,9 +4221,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 +4228,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 +4242,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; |