diff options
Diffstat (limited to 'dom/promise/Promise.cpp')
-rw-r--r-- | dom/promise/Promise.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/dom/promise/Promise.cpp b/dom/promise/Promise.cpp index 3abb517ac7..4ef34dfae5 100644 --- a/dom/promise/Promise.cpp +++ b/dom/promise/Promise.cpp @@ -719,12 +719,11 @@ void Promise::MaybeRejectWithClone(JSContext* aCx, // A WorkerRunnable to resolve/reject the Promise on the worker thread. // Calling thread MUST hold PromiseWorkerProxy's mutex before creating this. -class PromiseWorkerProxyRunnable final : public WorkerRunnable { +class PromiseWorkerProxyRunnable final : public WorkerThreadRunnable { public: PromiseWorkerProxyRunnable(PromiseWorkerProxy* aPromiseWorkerProxy, PromiseWorkerProxy::RunCallbackFunc aFunc) - : WorkerRunnable(aPromiseWorkerProxy->GetWorkerPrivate(), - "PromiseWorkerProxyRunnable", WorkerThread), + : WorkerThreadRunnable("PromiseWorkerProxyRunnable"), mPromiseWorkerProxy(aPromiseWorkerProxy), mFunc(aFunc) { MOZ_ASSERT(NS_IsMainThread()); @@ -735,7 +734,6 @@ class PromiseWorkerProxyRunnable final : public WorkerRunnable { WorkerPrivate* aWorkerPrivate) override { MOZ_ASSERT(aWorkerPrivate); aWorkerPrivate->AssertIsOnWorkerThread(); - MOZ_ASSERT(aWorkerPrivate == mWorkerPrivate); MOZ_ASSERT(mPromiseWorkerProxy); RefPtr<Promise> workerPromise = mPromiseWorkerProxy->GetWorkerPromise(); @@ -862,7 +860,7 @@ void PromiseWorkerProxy::RunCallback(JSContext* aCx, RefPtr<PromiseWorkerProxyRunnable> runnable = new PromiseWorkerProxyRunnable(this, aFunc); - runnable->Dispatch(); + runnable->Dispatch(GetWorkerPrivate()); } void PromiseWorkerProxy::ResolvedCallback(JSContext* aCx, |