Bug 1236789. Part 2 - fix assertions when |aFlags == NS_DISPATCH_TAIL|. r=bholley draft
authorJW Wang <jwwang@mozilla.com>
Fri, 04 Mar 2016 16:51:34 +0800
changeset 336866 dad104d732f2c3ba2e1fbc57248b4d62c6f7a1ff
parent 336865 72ec6fc0735a4c6626458db4b900396c0a6ee5c3
child 336867 a5311503295b1ee6b200aeadd1a5807dabef5df3
push id12199
push userjwwang@mozilla.com
push dateFri, 04 Mar 2016 08:52:08 +0000
reviewersbholley
bugs1236789
milestone47.0a1
Bug 1236789. Part 2 - fix assertions when |aFlags == NS_DISPATCH_TAIL|. r=bholley MozReview-Commit-ID: KUuyeJ9rJI2
xpcom/threads/nsThreadPool.cpp
--- a/xpcom/threads/nsThreadPool.cpp
+++ b/xpcom/threads/nsThreadPool.cpp
@@ -267,17 +267,18 @@ nsThreadPool::Dispatch(already_AddRefed<
     RefPtr<nsThreadSyncDispatch> wrapper =
       new nsThreadSyncDispatch(thread, Move(aEvent));
     PutEvent(wrapper);
 
     while (wrapper->IsPending()) {
       NS_ProcessNextEvent(thread);
     }
   } else {
-    NS_ASSERTION(aFlags == NS_DISPATCH_NORMAL, "unexpected dispatch flags");
+    NS_ASSERTION(aFlags == NS_DISPATCH_NORMAL ||
+                 aFlags == NS_DISPATCH_TAIL, "unexpected dispatch flags");
     PutEvent(Move(aEvent), aFlags);
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsThreadPool::IsOnCurrentThread(bool* aResult)
 {