Bug 1198459 - Prevent accessibility from initializing in content processes when e10s is running. r=tbsaunde
☠☠ backed out by a1caa7e7949f ☠ ☠
authorJim Mathies <jmathies@mozilla.com>
Wed, 09 Dec 2015 08:35:06 -0500
changeset 310222 bcb4ebf6fface76931d93d089367c27ee108dd04
parent 310221 b0da06541b8278c1827a5f11f5f65b9b0abbe417
child 310223 4b1d470d9f980ebd8e3180d8f11882a967e5ccb0
push id5513
push userraliiev@mozilla.com
push dateMon, 25 Jan 2016 13:55:34 +0000
treeherdermozilla-beta@5ee97dd05b5c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstbsaunde
bugs1198459
milestone45.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 1198459 - Prevent accessibility from initializing in content processes when e10s is running. r=tbsaunde
accessible/windows/msaa/Compatibility.h
dom/ipc/ContentParent.cpp
toolkit/xre/nsAppRunner.cpp
xpcom/system/nsIXULRuntime.idl
--- a/accessible/windows/msaa/Compatibility.h
+++ b/accessible/windows/msaa/Compatibility.h
@@ -34,36 +34,16 @@ public:
    */
   static bool IsWE() { return !!(sConsumers & WE); }
 
   /**
    * Return true if Dolphin mode is enabled.
    */
   static bool IsDolphin() { return !!(sConsumers & DOLPHIN); }
 
-  /**
-   * Return true if we should disable e10s due to a detected
-   * accessibility client.
-   */
-  static bool IsBlacklistedForE10S()
-  {
-    // We currently blacklist everything except UNKNOWN and UIAUTOMATION
-    return !!(sConsumers &
-              (NVDA     |
-               JAWS     |
-               OLDJAWS  |
-               WE       |
-               DOLPHIN  |
-               SEROTEK  |
-               COBRA    |
-               ZOOMTEXT |
-               KAZAGURU |
-               YOUDAO));
-  }
-
 private:
   Compatibility();
   Compatibility(const Compatibility&);
   Compatibility& operator = (const Compatibility&);
 
   /**
    * Initialize compatibility mode. Called by platform (see Platform.h) during
    * accessibility initialization.
--- a/dom/ipc/ContentParent.cpp
+++ b/dom/ipc/ContentParent.cpp
@@ -266,16 +266,21 @@ using namespace mozilla::system;
 #endif
 
 #ifdef MOZ_GAMEPAD
 #include "mozilla/dom/GamepadMonitoring.h"
 #endif
 
 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;
 #ifdef MOZ_ENABLE_PROFILER_SPS
 using mozilla::ProfileGatherer;
 #endif
 
 #ifdef MOZ_CRASHREPORTER
 using namespace CrashReporter;
@@ -1550,17 +1555,25 @@ ContentParent::Init()
         cpId.AppendInt(static_cast<uint64_t>(this->ChildID()));
         obs->NotifyObservers(static_cast<nsIObserver*>(this), "ipc:content-created", cpId.get());
     }
 
 #ifdef ACCESSIBILITY
     // If accessibility is running in chrome process then start it in content
     // process.
     if (nsIPresShell::IsAccessibilityActive()) {
+#if !defined(XP_WIN)
         Unused << SendActivateA11y();
+#else
+        // On Windows we currently only enable a11y in the content process
+        // for testing purposes.
+        if (Preferences::GetBool(kForceEnableE10sPref, false)) {
+            Unused << SendActivateA11y();
+        }
+#endif
     }
 #endif
 
 #ifdef MOZ_ENABLE_PROFILER_SPS
     nsCOMPtr<nsIProfiler> profiler(do_GetService("@mozilla.org/tools/profiler;1"));
     bool profilerActive = false;
     DebugOnly<nsresult> rv = profiler->IsActive(&profilerActive);
     MOZ_ASSERT(NS_SUCCEEDED(rv));
@@ -3329,17 +3342,25 @@ ContentParent::Observe(nsISupports* aSub
         Unused << SendVolumeRemoved(volName);
     }
 #endif
 #ifdef ACCESSIBILITY
     // Make sure accessibility is running in content process when accessibility
     // gets initiated in chrome process.
     else if (aData && (*aData == '1') &&
              !strcmp(aTopic, "a11y-init-or-shutdown")) {
+#if !defined(XP_WIN)
         Unused << SendActivateA11y();
+#else
+        // On Windows we currently only enable a11y in the content process
+        // for testing purposes.
+        if (Preferences::GetBool(kForceEnableE10sPref, false)) {
+            Unused << SendActivateA11y();
+        }
+#endif
     }
 #endif
     else if (!strcmp(aTopic, "app-theme-changed")) {
         Unused << SendOnAppThemeChanged();
     }
 #ifdef MOZ_ENABLE_PROFILER_SPS
     else if (!strcmp(aTopic, "profiler-started")) {
         nsCOMPtr<nsIProfilerStartParams> params(do_QueryInterface(aSubject));
--- a/toolkit/xre/nsAppRunner.cpp
+++ b/toolkit/xre/nsAppRunner.cpp
@@ -1019,34 +1019,16 @@ nsXULAppInfo::GetAccessibilityEnabled(bo
   *aResult = GetAccService() != nullptr;
 #else
   *aResult = false;
 #endif
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsXULAppInfo::GetAccessibilityIsBlacklistedForE10S(bool* aResult)
-{
-  *aResult = false;
-#if defined(ACCESSIBILITY)
-#if defined(XP_WIN)
-  if (GetAccService() && mozilla::a11y::Compatibility::IsBlacklistedForE10S()) {
-    *aResult = true;
-  }
-#elif defined(XP_MACOSX)
-  if (GetAccService()) {
-    *aResult = true;
-  }
-#endif
-#endif // defined(ACCESSIBILITY)
-  return NS_OK;
-}
-
-NS_IMETHODIMP
 nsXULAppInfo::GetIs64Bit(bool* aResult)
 {
 #ifdef HAVE_64BIT_BUILD
   *aResult = true;
 #else
   *aResult = false;
 #endif
   return NS_OK;
--- a/xpcom/system/nsIXULRuntime.idl
+++ b/xpcom/system/nsIXULRuntime.idl
@@ -18,17 +18,17 @@ bool BrowserTabsRemoteAutostart();
 
 /**
  * Provides information about the XUL runtime.
  * @status UNSTABLE - This interface is not frozen and will probably change in
  *                    future releases. If you need this functionality to be
  *                    stable/frozen, please contact Benjamin Smedberg.
  */
 
-[scriptable, uuid(ce9d05f4-0c20-4f52-87e1-3a425e61e2f3)]
+[scriptable, uuid(a1b2e167-b748-42bf-ba85-996ec39062b9)]
 interface nsIXULRuntime : nsISupports
 {
   /**
    * Whether the application was launched in safe mode.
    */
   readonly attribute boolean inSafeMode;
 
   /**
@@ -92,22 +92,16 @@ interface nsIXULRuntime : nsISupports
   readonly attribute boolean browserTabsRemoteAutostart;
 
   /**
    * If true, the accessibility service is running.
    */
   readonly attribute boolean accessibilityEnabled;
 
   /**
-   * Indicates if the active accessibility client is blacklisted for e10s.
-   * DO NOT USE! This is temporary and will be removed.
-   */
-  readonly attribute boolean accessibilityIsBlacklistedForE10S;
-
-  /**
    * Indicates whether the current Firefox build is 64-bit.
    */
   readonly attribute boolean is64Bit;
 
   /**
    * Signal the apprunner to invalidate caches on the next restart.
    * This will cause components to be autoregistered and all
    * fastload data to be re-created.