Bug 1406212 - Remove multiprocessBlockPolicy. r=Felipe
MozReview-Commit-ID: F6P5fUPSc7L
--- a/toolkit/xre/nsAppRunner.cpp
+++ b/toolkit/xre/nsAppRunner.cpp
@@ -980,23 +980,16 @@ nsXULAppInfo::GetBrowserTabsRemoteAutost
NS_IMETHODIMP
nsXULAppInfo::GetMaxWebProcessCount(uint32_t* aResult)
{
*aResult = mozilla::GetMaxWebProcessCount();
return NS_OK;
}
NS_IMETHODIMP
-nsXULAppInfo::GetMultiprocessBlockPolicy(uint32_t* aResult)
-{
- *aResult = MultiprocessBlockPolicy();
- return NS_OK;
-}
-
-NS_IMETHODIMP
nsXULAppInfo::GetAccessibilityEnabled(bool* aResult)
{
#ifdef ACCESSIBILITY
*aResult = GetAccService() != nullptr;
#else
*aResult = false;
#endif
return NS_OK;
@@ -5102,47 +5095,16 @@ enum {
kE10sForceDisabled = 8,
// kE10sDisabledForXPAcceleration = 9, removed in bug 1296353
// kE10sDisabledForOperatingSystem = 10, removed due to xp-eol
};
const char* kForceEnableE10sPref = "browser.tabs.remote.force-enable";
const char* kForceDisableE10sPref = "browser.tabs.remote.force-disable";
-uint32_t
-MultiprocessBlockPolicy()
-{
- if (XRE_IsContentProcess()) {
- // If we're in a content process, we're not blocked.
- return 0;
- }
-
- /**
- * Avoids enabling e10s if there are add-ons installed.
- */
- bool addonsCanDisable = Preferences::GetBool("extensions.e10sBlocksEnabling", false);
- bool disabledByAddons = Preferences::GetBool("extensions.e10sBlockedByAddons", false);
-
-#ifdef MOZ_CRASHREPORTER
- CrashReporter::AnnotateCrashReport(NS_LITERAL_CSTRING("AddonsShouldHaveBlockedE10s"),
- disabledByAddons ? NS_LITERAL_CSTRING("1")
- : NS_LITERAL_CSTRING("0"));
-#endif
-
- if (addonsCanDisable && disabledByAddons) {
- return kE10sDisabledForAddons;
- }
-
- /*
- * None of the blocking policies matched, so e10s is allowed to run. Return
- * 0, indicating success.
- */
- return 0;
-}
-
namespace mozilla {
bool
BrowserTabsRemoteAutostart()
{
if (gBrowserTabsRemoteAutostartInitialized) {
return gBrowserTabsRemoteAutostart;
}
@@ -5153,22 +5115,17 @@ BrowserTabsRemoteAutostart()
gBrowserTabsRemoteAutostart = true;
return gBrowserTabsRemoteAutostart;
}
bool optInPref = Preferences::GetBool("browser.tabs.remote.autostart", true);
int status = kE10sEnabledByDefault;
if (optInPref) {
- uint32_t blockPolicy = MultiprocessBlockPolicy();
- if (blockPolicy != 0) {
- status = blockPolicy;
- } else {
- gBrowserTabsRemoteAutostart = true;
- }
+ gBrowserTabsRemoteAutostart = true;
} else {
status = kE10sDisabledByUser;
}
// Uber override pref for manual testing purposes
if (Preferences::GetBool(kForceEnableE10sPref, false)) {
gBrowserTabsRemoteAutostart = true;
status = kE10sEnabledByUser;
--- a/toolkit/xre/nsAppRunner.h
+++ b/toolkit/xre/nsAppRunner.h
@@ -124,20 +124,13 @@ const char* PlatformBuildID();
} // namespace mozilla
/**
* Set up platform specific error handling such as suppressing DLL load dialog
* and the JIT debugger on Windows, and install unix signal handlers.
*/
void SetupErrorHandling(const char* progname);
-/**
- * A numeric value indicating whether multiprocess might be blocked.
- * Possible values can be found at nsAppRunner.cpp. A value of 0
- * represents not blocking.
- */
-uint32_t MultiprocessBlockPolicy();
-
#ifdef MOZ_WIDGET_GTK
const char* DetectDisplay();
#endif
#endif // nsAppRunner_h__
--- a/xpcom/system/nsIXULRuntime.idl
+++ b/xpcom/system/nsIXULRuntime.idl
@@ -115,23 +115,16 @@ interface nsIXULRuntime : nsISupports
/**
* The current e10s-multi experiment number. Set dom.ipc.multiOptOut to (at
* least) this to disable it until the next experiment.
*/
const uint32_t E10S_MULTI_EXPERIMENT = 1;
/**
- * A numeric value indicating whether multiprocess might be blocked.
- * Possible values can be found at nsAppRunner.cpp. A value of 0
- * represents not blocking.
- */
- readonly attribute unsigned long multiprocessBlockPolicy;
-
- /**
* If true, the accessibility service is running.
*/
readonly attribute boolean accessibilityEnabled;
/**
* If true, the AccessibleHandler dll is used.
*/
readonly attribute boolean accessibleHandlerUsed;