Bug 1236789. Part 2 - fix assertions when |aFlags == NS_DISPATCH_TAIL|. r=bholley
MozReview-Commit-ID: KUuyeJ9rJI2
--- 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)
{