Bug 1376858 - Use SystemGroup to label nsIThread::AsyncShutdown, r=billm
MozReview-Commit-ID: IDPE6zhEnVI
--- a/xpcom/threads/nsThreadPool.cpp
+++ b/xpcom/threads/nsThreadPool.cpp
@@ -141,18 +141,18 @@ nsThreadPool::ShutdownThread(nsIThread*
// such a way that the newly created thread is no longer necessary.
// In the first case, we must go to another thread to shut aThread down
// (because it is the current thread). In the second case, we cannot
// synchronously shut down the current thread (because then Dispatch() would
// spin the event loop, and that could blow up the world), and asynchronous
// shutdown requires this thread have an event loop (and it may not, see bug
// 10204784). The simplest way to cover all cases is to asynchronously
// shutdown aThread from the main thread.
- NS_DispatchToMainThread(NewRunnableMethod("nsIThread::AsyncShutdown", aThread,
- &nsIThread::AsyncShutdown));
+ SystemGroup::Dispatch(TaskCategory::Other, NewRunnableMethod(
+ "nsIThread::AsyncShutdown", aThread, &nsIThread::AsyncShutdown));
}
NS_IMETHODIMP
nsThreadPool::Run()
{
LOG(("THRD-P(%p) enter %s\n", this, mName.BeginReading()));
nsCOMPtr<nsIThread> current;