Backed out changeset daa19810f688 (bug 1138620)
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Tue, 19 May 2015 11:44:37 +0200
changeset 244498 305a36426c752d258296f90b8510a6f131c2e5b2
parent 244497 280458ef7345f41535a581f2e222185132050501
child 244499 34495fd71b7972b7842bba6abeb013903dfa37c0
push id28782
push userkwierso@gmail.com
push dateTue, 19 May 2015 23:42:58 +0000
treeherdermozilla-central@ac277e615f8f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1138620
milestone41.0a1
backs outdaa19810f688c3b01b765ce41355d13d8c376dc7
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
Backed out changeset daa19810f688 (bug 1138620)
xpcom/threads/nsIThreadManager.idl
xpcom/threads/nsThreadManager.cpp
xpcom/threads/nsThreadManager.h
--- a/xpcom/threads/nsIThreadManager.idl
+++ b/xpcom/threads/nsIThreadManager.idl
@@ -8,17 +8,17 @@
 
 [ptr] native PRThread(PRThread);
 
 interface nsIThread;
 
 /**
  * An interface for creating and locating nsIThread instances.
  */
-[scriptable, uuid(1be89eca-e2f7-453b-8d38-c11ba247f6f3)]
+[scriptable, uuid(04092259-4498-4c82-ac52-f9225eb114d0)]
 interface nsIThreadManager : nsISupports
 {
   /**
    * Default number of bytes reserved for a thread's stack, if no stack size
    * is specified in newThread(). 0 means use platform default.
    */
   const unsigned long DEFAULT_STACK_SIZE = 0;
 
@@ -60,9 +60,16 @@ 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;
+
+  /**
+   * Informs the thread manager to not monitor the status of the current thread.
+   * This method only works on platforms with Nuwa enabled; on other platforms,
+   * it throws an error.
+   */
+  [noscript] void setIgnoreThreadStatus();
 };
--- a/xpcom/threads/nsThreadManager.cpp
+++ b/xpcom/threads/nsThreadManager.cpp
@@ -425,23 +425,28 @@ nsThreadManager::GetIsMainThread(bool* a
 
 uint32_t
 nsThreadManager::GetHighestNumberOfThreads()
 {
   OffTheBooksMutexAutoLock lock(mLock);
   return mHighestNumberOfThreads;
 }
 
-#ifdef MOZ_NUWA_PROCESS
-void
+NS_IMETHODIMP
 nsThreadManager::SetIgnoreThreadStatus()
 {
+#ifdef MOZ_NUWA_PROCESS
   GetCurrentThreadStatusInfo()->mIgnored = true;
+  return NS_OK;
+#else
+  return NS_ERROR_NOT_IMPLEMENTED;
+#endif
 }
 
+#ifdef MOZ_NUWA_PROCESS
 void
 nsThreadManager::SetThreadIdle(nsIRunnable **aReturnRunnable)
 {
   SetThreadIsWorking(GetCurrentThreadStatusInfo(), false, aReturnRunnable);
 }
 
 void
 nsThreadManager::SetThreadWorking()
--- a/xpcom/threads/nsThreadManager.h
+++ b/xpcom/threads/nsThreadManager.h
@@ -67,18 +67,16 @@ public:
 
   // This needs to be public in order to support static instantiation of this
   // class with older compilers (e.g., egcs-2.91.66).
   ~nsThreadManager()
   {
   }
 
 #ifdef MOZ_NUWA_PROCESS
-  void SetIgnoreThreadStatus();
-
   // |SetThreadWorking| and |SetThreadIdle| set status of thread that is
   // currently running. They get thread status information from TLS and pass
   // the information to |SetThreadIsWorking|.
   void SetThreadIdle(nsIRunnable** aReturnRunnable);
   void SetThreadWorking();
 
   // |SetThreadIsWorking| is where is status actually changed. Thread status
   // information is passed as a argument so caller must obtain the structure