Bug 1406212 - Remove multiprocessBlockPolicy. r=Felipe
authorBlake Kaplan <mrbkap@gmail.com>
Thu, 12 Oct 2017 11:16:46 -0700
changeset 437707 976cc4e68b45c80528d397d6d81f988bd3ebcc9d
parent 437706 30f7a39f1cfb67289ebf5c7e0214776a403b7083
child 437708 0d1925ea1d26529f93fbde110a5e05b292e39196
push id8114
push userjlorenzo@mozilla.com
push dateThu, 02 Nov 2017 16:33:21 +0000
treeherdermozilla-beta@73e0d89a540f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersFelipe
bugs1406212
milestone58.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1406212 - Remove multiprocessBlockPolicy. r=Felipe MozReview-Commit-ID: F6P5fUPSc7L
toolkit/xre/nsAppRunner.cpp
toolkit/xre/nsAppRunner.h
xpcom/system/nsIXULRuntime.idl
--- 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;