Bug 1491558 - Remove the XPCOM registration for nsThreadPool; r=froydnj

Differential Revision: https://phabricator.services.mozilla.com/D5943
This commit is contained in:
Ehsan Akhgari
2018-09-15 04:10:21 -04:00
parent b0186c1718
commit 8c6e3d874c
15 changed files with 22 additions and 43 deletions

View File

@@ -14,7 +14,7 @@
#include "mozilla/SyncRunnable.h"
#include "mozilla/Unused.h"
#include "gfxUtils.h"
#include "nsIThreadPool.h"
#include "nsThreadPool.h"
#include "nsNetUtil.h"
#include "nsXPCOMCIDInternal.h"
#include "YCbCrUtils.h"
@@ -558,7 +558,7 @@ nsresult
ImageEncoder::EnsureThreadPool()
{
if (!sThreadPool) {
nsCOMPtr<nsIThreadPool> threadPool = do_CreateInstance(NS_THREADPOOL_CONTRACTID);
nsCOMPtr<nsIThreadPool> threadPool = new nsThreadPool();
sThreadPool = threadPool;
if (!NS_IsMainThread()) {