Bug 1300118 P4 Make nsThread expect NS_DISPATCH_AT_END similar to nsThreadPool. r=bholley
☠☠ backed out by 79d2f549c288 ☠ ☠
authorBen Kelly <ben@wanderview.com>
Mon, 12 Sep 2016 12:32:21 -0700
changeset 354874 6fe61ed092e805d38fddae2bcd1319cfb5892100
parent 354873 dd18e29b64bf31d0fbccba9ae461febac3891ea7
child 354875 24f714ad248c42cb3a6ad0f63ebdda16d09f2bb2
push id6570
push userraliiev@mozilla.com
push dateMon, 14 Nov 2016 12:26:13 +0000
treeherdermozilla-beta@f455459b2ae5 [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)