Backed out changeset 781aa8ce66f6 (bug 1355161) for supposedly breaking crashtests and reftests on Android 4.3. r=backout
authorSebastian Hengst <archaeopteryx@coole-files.de>
Fri, 14 Apr 2017 23:39:23 +0200
changeset 563131 41e323a5010edd33bf16f67db5da60583b457eb4
parent 563130 d95e9e35034405215f1db9e21cfd36b403669d60
child 563132 32270cc5aeeafa676d43d47679ea87c580e665a7
push id54218
push userbmo:mstange@themasta.com
push dateSat, 15 Apr 2017 04:22:40 +0000
reviewersbackout
bugs1355161
milestone55.0a1
backs out781aa8ce66f68af1dec97d3f94ef7a6330a42cc7
Backed out changeset 781aa8ce66f6 (bug 1355161) for supposedly breaking crashtests and reftests on Android 4.3. r=backout
xpcom/threads/nsIThreadManager.idl
xpcom/threads/nsThreadManager.cpp
--- a/xpcom/threads/nsIThreadManager.idl
+++ b/xpcom/threads/nsIThreadManager.idl
@@ -3,17 +3,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsISupports.idl"
 
 [ptr] native PRThread(PRThread);
 
-interface nsIRunnable;
 interface nsIThread;
 
 /**
  * An interface for creating and locating nsIThread instances.
  */
 [scriptable, uuid(1be89eca-e2f7-453b-8d38-c11ba247f6f3)]
 interface nsIThreadManager : nsISupports
 {
@@ -75,19 +74,9 @@ interface nsIThreadManager : nsISupports
    */
   readonly attribute nsIThread currentThread;
 
   /**
    * This attribute is true if the calling thread is the main thread of the
    * application process.
    */
   readonly attribute boolean isMainThread;
-
-  /**
-   * This queues a runnable to the main thread. It's a shortcut for JS callers
-   * to be used instead of
-   *   .mainThread.dispatch(runnable, Ci.nsIEventTarget.DISPATCH_NORMAL);
-   * or
-   *   .currentThread.dispatch(runnable, Ci.nsIEventTarget.DISPATCH_NORMAL);
-   * C++ callers should instead use NS_DispatchToMainThread.
-   */
-  void dispatchToMainThread(in nsIRunnable event);
 };
--- a/xpcom/threads/nsThreadManager.cpp
+++ b/xpcom/threads/nsThreadManager.cpp
@@ -343,22 +343,8 @@ nsThreadManager::GetIsMainThread(bool* a
 }
 
 uint32_t
 nsThreadManager::GetHighestNumberOfThreads()
 {
   OffTheBooksMutexAutoLock lock(mLock);
   return mHighestNumberOfThreads;
 }
-
-NS_IMETHODIMP
-nsThreadManager::DispatchToMainThread(nsIRunnable *aEvent)
-{
-  // Note: C++ callers should instead use NS_DispatchToMainThread.
-  MOZ_ASSERT(NS_IsMainThread());
-
-  // Keep this functioning during Shutdown
-  if (NS_WARN_IF(!mMainThread)) {
-    return NS_ERROR_NOT_INITIALIZED;
-  }
-
-  return mMainThread->DispatchFromScript(aEvent, 0);
-}