diff --git a/dom/workers/WorkerThread.cpp b/dom/workers/WorkerThread.cpp index a04a1efedd90..f7631055dc85 100644 --- a/dom/workers/WorkerThread.cpp +++ b/dom/workers/WorkerThread.cpp @@ -95,8 +95,6 @@ SafeRefPtr WorkerThread::Create( NS_WARNING("Failed to create new thread!"); return nullptr; } - thread->mAbstractThread = AbstractThread::CreateXPCOMThreadWrapper( - thread.unsafeGetRawPtr(), false /* aRequireTailDispatch */); return thread; } @@ -334,14 +332,6 @@ PerformanceCounter* WorkerThread::GetPerformanceCounter( return nullptr; } -NS_IMETHODIMP -WorkerThread::Shutdown() { - MOZ_ALWAYS_SUCCEEDS(nsThread::Shutdown()); - // We need to break the cycle. - mAbstractThread = nullptr; - return NS_OK; -} - NS_IMPL_ISUPPORTS(WorkerThread::Observer, nsIThreadObserver) NS_IMETHODIMP diff --git a/dom/workers/WorkerThread.h b/dom/workers/WorkerThread.h index 20c26f387c3f..78ac19eaae3f 100644 --- a/dom/workers/WorkerThread.h +++ b/dom/workers/WorkerThread.h @@ -18,7 +18,6 @@ class nsIRunnable; namespace mozilla { -class AbstractThread; namespace dom { class WorkerRunnable; @@ -57,12 +56,6 @@ class WorkerThread final : public nsThread { // Protected by nsThread::mLock and waited on with mWorkerPrivateCondVar. uint32_t mOtherThreadsDispatchingViaEventTarget; - // We create an AbstractThread for this current nsThread instance in order to - // support direct task dispatching. Direct tasks work in a similar fashion to - // microtasks and allow an IPDL MozPromise to behave like JS promise. - // An AbstractThread only need to exist on the current thread for Direct Task - // dispatch to be available. - RefPtr mAbstractThread; #ifdef DEBUG // Protected by nsThread::mLock. bool mAcceptingNonWorkerRunnables; @@ -90,8 +83,6 @@ class WorkerThread final : public nsThread { PerformanceCounter* GetPerformanceCounter(nsIRunnable* aEvent) const override; - NS_IMETHODIMP Shutdown() override; - NS_INLINE_DECL_REFCOUNTING_INHERITED(WorkerThread, nsThread) private: