summaryrefslogtreecommitdiff
path: root/toolkit
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2022-01-11 15:34:17 +0000
committerMoonchild <moonchild@palemoon.org>2022-04-08 00:55:37 +0200
commit56d9003017a94e7619f98e76b04929115514d08c (patch)
tree952bd79e8cb7cfa2d071b6dbf13d95caed9d24fa /toolkit
parente49b80dba7393d5baff831251f7981bc21324d81 (diff)
downloaduxp-56d9003017a94e7619f98e76b04929115514d08c.tar.gz
Issue #953 - Neuter the user-facing controls for e10s
This should prevent people using a massive footgun that would blow off their entire legs. Requires appropriate FE changes.
Diffstat (limited to 'toolkit')
-rw-r--r--toolkit/components/thumbnails/BackgroundPageThumbs.jsm5
-rw-r--r--toolkit/xre/nsAppRunner.cpp84
2 files changed, 0 insertions, 89 deletions
diff --git a/toolkit/components/thumbnails/BackgroundPageThumbs.jsm b/toolkit/components/thumbnails/BackgroundPageThumbs.jsm
index 77b7c8e2ca..4c7ca90e1d 100644
--- a/toolkit/components/thumbnails/BackgroundPageThumbs.jsm
+++ b/toolkit/components/thumbnails/BackgroundPageThumbs.jsm
@@ -179,11 +179,6 @@ const BackgroundPageThumbs = {
browser.setAttribute("type", "content");
browser.setAttribute("disableglobalhistory", "true");
- if (Services.prefs.getPrefType("browser.tabs.remote") == Services.prefs.PREF_BOOL &&
- Services.prefs.getBoolPref("browser.tabs.remote")) {
- browser.setAttribute("remote", "true");
- }
-
// Size the browser. Make its aspect ratio the same as the canvases' that
// the thumbnails are drawn into; the canvases' aspect ratio is the same as
// the screen's, so use that. Aim for a size in the ballpark of 1024x768.
diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp
index 90e29f5517..932325458e 100644
--- a/toolkit/xre/nsAppRunner.cpp
+++ b/toolkit/xre/nsAppRunner.cpp
@@ -825,42 +825,15 @@ nsXULAppInfo::GetUniqueProcessID(uint64_t* aResult)
return NS_OK;
}
-static bool gBrowserTabsRemoteAutostart = false;
-static uint64_t gBrowserTabsRemoteStatus = 0;
-static bool gBrowserTabsRemoteAutostartInitialized = false;
-
-static bool gMultiprocessBlockPolicyInitialized = false;
-static uint32_t gMultiprocessBlockPolicy = 0;
-
NS_IMETHODIMP
nsXULAppInfo::Observe(nsISupports *aSubject, const char *aTopic, const char16_t *aData) {
if (!nsCRT::strcmp(aTopic, "getE10SBlocked")) {
- nsCOMPtr<nsISupportsPRUint64> ret = do_QueryInterface(aSubject);
- if (!ret)
- return NS_ERROR_FAILURE;
-
- ret->SetData(gBrowserTabsRemoteStatus);
-
return NS_OK;
}
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP
-nsXULAppInfo::GetBrowserTabsRemoteAutostart(bool* aResult)
-{
- *aResult = BrowserTabsRemoteAutostart();
- return NS_OK;
-}
-
-NS_IMETHODIMP
-nsXULAppInfo::GetMultiprocessBlockPolicy(uint32_t* aResult)
-{
- *aResult = MultiprocessBlockPolicy();
- return NS_OK;
-}
-
-NS_IMETHODIMP
nsXULAppInfo::GetAccessibilityEnabled(bool* aResult)
{
#ifdef ACCESSIBILITY
@@ -4053,21 +4026,6 @@ XRE_IsContentProcess()
return XRE_GetProcessType() == GeckoProcessType_Content;
}
-// If you add anything to this enum, please update about:support to reflect it
-enum {
- kE10sEnabledByUser = 0,
- kE10sEnabledByDefault = 1,
- kE10sDisabledByUser = 2,
- // kE10sDisabledInSafeMode = 3, was removed in bug 1172491.
- kE10sDisabledForAccessibility = 4,
- // kE10sDisabledForMacGfx = 5, was removed in bug 1068674.
- // kE10sDisabledForBidi = 6, removed in bug 1309599
- kE10sDisabledForAddons = 7,
- kE10sForceDisabled = 8,
- // kE10sDisabledForXPAcceleration = 9, removed in bug 1296353
- // kE10sDisabledForOperatingSystem = 10, removed due to xp-eol
-};
-
const char* kAccessibilityLastRunDatePref = "accessibility.lastLoadDate";
const char* kAccessibilityLoadedLastSessionPref = "accessibility.loadedInLastSession";
@@ -4080,48 +4038,6 @@ PRTimeToSeconds(PRTime t_usec)
}
#endif
-uint32_t
-MultiprocessBlockPolicy() {
- if (gMultiprocessBlockPolicyInitialized) {
- return gMultiprocessBlockPolicy;
- }
- gMultiprocessBlockPolicyInitialized = true;
-
- // We do not support E10S, block by policy.
- gMultiprocessBlockPolicy = kE10sForceDisabled;
-
- return gMultiprocessBlockPolicy;
-}
-
-bool
-mozilla::BrowserTabsRemoteAutostart()
-{
- if (gBrowserTabsRemoteAutostartInitialized) {
- return gBrowserTabsRemoteAutostart;
- }
- gBrowserTabsRemoteAutostartInitialized = true;
-
- 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 (prefEnabled) {
- uint32_t blockPolicy = MultiprocessBlockPolicy();
- if (blockPolicy != 0) {
- status = blockPolicy;
- } else {
- MOZ_CRASH("e10s force enabled bypassing policy -- unsupported configuration");
- }
- } else {
- status = kE10sDisabledByUser;
- }
-
- gBrowserTabsRemoteStatus = status;
-
- return gBrowserTabsRemoteAutostart;
-}
-
void
SetupErrorHandling(const char* progname)
{