diff options
Diffstat (limited to 'dom/workers/ServiceWorkerPrivate.cpp')
-rw-r--r-- | dom/workers/ServiceWorkerPrivate.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/dom/workers/ServiceWorkerPrivate.cpp b/dom/workers/ServiceWorkerPrivate.cpp index 24b2e11e6..23ae3b366 100644 --- a/dom/workers/ServiceWorkerPrivate.cpp +++ b/dom/workers/ServiceWorkerPrivate.cpp @@ -214,7 +214,7 @@ private: mDone = true; #endif mCallback->SetResult(aResult); - MOZ_ALWAYS_SUCCEEDS(mWorkerPrivate->DispatchToMainThread(mCallback)); + MOZ_ALWAYS_SUCCEEDS(NS_DispatchToMainThread(mCallback)); } }; @@ -500,7 +500,7 @@ public: if (mRegistration) { nsCOMPtr<nsIRunnable> runnable = new RegistrationUpdateRunnable(mRegistration, true /* time check */); - aWorkerPrivate->DispatchToMainThread(runnable.forget()); + NS_DispatchToMainThread(runnable.forget()); } ExtendableEventWorkerRunnable::PostRun(aCx, aWorkerPrivate, aRunResult); @@ -541,7 +541,7 @@ public: Cancel() override { mCallback->SetResult(false); - MOZ_ALWAYS_SUCCEEDS(mWorkerPrivate->DispatchToMainThread(mCallback)); + MOZ_ALWAYS_SUCCEEDS(NS_DispatchToMainThread(mCallback)); return WorkerRunnable::Cancel(); } @@ -637,7 +637,7 @@ public: mDone = true; mCallback->SetResult(aResult); - nsresult rv = mWorkerPrivate->DispatchToMainThread(mCallback); + nsresult rv = NS_DispatchToMainThread(mCallback); if (NS_WARN_IF(NS_FAILED(rv))) { NS_RUNTIMEABORT("Failed to dispatch life cycle event handler."); } @@ -768,7 +768,6 @@ public: void Report(uint16_t aReason = nsIPushErrorReporter::DELIVERY_INTERNAL_ERROR) { - WorkerPrivate* workerPrivate = mWorkerPrivate; mWorkerPrivate->AssertIsOnWorkerThread(); mWorkerPrivate = nullptr; @@ -780,7 +779,7 @@ public: NewRunnableMethod<uint16_t>(this, &PushErrorReporter::ReportOnMainThread, aReason); MOZ_ALWAYS_TRUE(NS_SUCCEEDED( - workerPrivate->DispatchToMainThread(runnable.forget()))); + NS_DispatchToMainThread(runnable.forget()))); } void ReportOnMainThread(uint16_t aReason) @@ -1434,7 +1433,7 @@ public: Cancel() override { nsCOMPtr<nsIRunnable> runnable = new ResumeRequest(mInterceptedChannel); - if (NS_FAILED(mWorkerPrivate->DispatchToMainThread(runnable))) { + if (NS_FAILED(NS_DispatchToMainThread(runnable))) { NS_WARNING("Failed to resume channel on FetchEventRunnable::Cancel()!\n"); } WorkerRunnable::Cancel(); @@ -1554,7 +1553,7 @@ private: NS_ERROR_INTERCEPTION_FAILED); } - MOZ_ALWAYS_SUCCEEDS(mWorkerPrivate->DispatchToMainThread(runnable.forget())); + MOZ_ALWAYS_SUCCEEDS(NS_DispatchToMainThread(runnable)); } RefPtr<Promise> waitUntilPromise = event->GetPromise(); |