Bug 942984 - Backout c69ab8cdad98 for causing bug 938107. a=bajaj
authorChris Pearce <cpearce@mozilla.com>
Fri, 06 Dec 2013 16:46:36 -0500
changeset 166696 59b8da3b00a86a1c47b4c3d68b1a67674bea6482
parent 166695 2c001ca401cc6c9b52379846a1a9fb0946177a41
child 166697 d00d4c5a9037affe070ace7d78f3bcbda85fd627
push id3066
push userakeybl@mozilla.com
push dateMon, 09 Dec 2013 19:58:46 +0000
treeherdermozilla-beta@a31a0dce83aa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbajaj
bugs942984, 938107
milestone27.0a2
Bug 942984 - Backout c69ab8cdad98 for causing bug 938107. a=bajaj
xpcom/build/nsXPCOMPrivate.h
xpcom/threads/nsThread.cpp
--- a/xpcom/build/nsXPCOMPrivate.h
+++ b/xpcom/build/nsXPCOMPrivate.h
@@ -267,17 +267,16 @@ void LogTerm();
 #elif defined(CCHMAXPATH)
 #define MAXPATHLEN CCHMAXPATH
 #else
 #define MAXPATHLEN 1024
 #endif
 #endif
 
 extern bool gXPCOMShuttingDown;
-extern bool gXPCOMThreadsShutDown;
 
 namespace mozilla {
 namespace services {
 
 /** 
  * Clears service cache, sets gXPCOMShuttingDown
  */
 void Shutdown();
--- a/xpcom/threads/nsThread.cpp
+++ b/xpcom/threads/nsThread.cpp
@@ -12,17 +12,16 @@
 #include "nsIProgrammingLanguage.h"
 #include "nsAutoPtr.h"
 #include "nsCOMPtr.h"
 #include "pratom.h"
 #include "prlog.h"
 #include "nsIObserverService.h"
 #include "mozilla/HangMonitor.h"
 #include "mozilla/Services.h"
-#include "nsXPCOMPrivate.h"
 
 #define HAVE_UALARM _BSD_SOURCE || (_XOPEN_SOURCE >= 500 ||                 \
                       _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED) &&           \
                       !(_POSIX_C_SOURCE >= 200809L || _XOPEN_SOURCE >= 700)
 
 #if defined(XP_UNIX) && !defined(ANDROID) && !defined(DEBUG) && HAVE_UALARM \
   && defined(_GNU_SOURCE)
 # define MOZ_CANARY
@@ -369,20 +368,16 @@ nsThread::PutEvent(nsIRunnable *event)
 
 NS_IMETHODIMP
 nsThread::Dispatch(nsIRunnable *event, uint32_t flags)
 {
   LOG(("THRD(%p) Dispatch [%p %x]\n", this, event, flags));
 
   NS_ENSURE_ARG_POINTER(event);
 
-  if (gXPCOMThreadsShutDown && MAIN_THREAD != mIsMainThread) {
-    return NS_ERROR_ILLEGAL_DURING_SHUTDOWN;
-  }
-
   if (flags & DISPATCH_SYNC) {
     nsThread *thread = nsThreadManager::get()->GetCurrentThread();
     NS_ENSURE_STATE(thread);
 
     // XXX we should be able to do something better here... we should
     //     be able to monitor the slot occupied by this event and use
     //     that to tell us when the event has been processed.