Bug 1300118 P4 Make nsThread expect NS_DISPATCH_AT_END similar to nsThreadPool. r=bholley
authorBen Kelly <ben@wanderview.com>
Tue, 13 Sep 2016 20:12:15 -0700
changeset 313863 8a8e26a6969040ec85bd9934e5fdf42db55031f6
parent 313862 e72b06de40c005266f3fed08331eaf7141051a60
child 313864 f5cd6f6bc89e310091674f09f19e18f92a949aa6
push id32264
push usercbook@mozilla.com
push dateWed, 14 Sep 2016 10:18:20 +0000
treeherderautoland@b9c4a0402a0a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbholley
bugs1300118
milestone51.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 1300118 P4 Make nsThread expect NS_DISPATCH_AT_END similar to nsThreadPool. r=bholley
xpcom/threads/nsThread.cpp
--- a/xpcom/threads/nsThread.cpp
+++ b/xpcom/threads/nsThread.cpp
@@ -743,17 +743,18 @@ nsThread::DispatchInternal(already_AddRe
 
     // Allows waiting; ensure no locks are held that would deadlock us!
     while (wrapper->IsPending()) {
       NS_ProcessNextEvent(thread, true);
     }
     return NS_OK;
   }
 
-  NS_ASSERTION(aFlags == NS_DISPATCH_NORMAL, "unexpected dispatch flags");
+  NS_ASSERTION(aFlags == NS_DISPATCH_NORMAL ||
+               aFlags == NS_DISPATCH_AT_END, "unexpected dispatch flags");
   return PutEvent(event.take(), aTarget);
 }
 
 //-----------------------------------------------------------------------------
 // nsIEventTarget
 
 NS_IMETHODIMP
 nsThread::DispatchFromScript(nsIRunnable* aEvent, uint32_t aFlags)