summaryrefslogtreecommitdiffstats
path: root/dom/push/PushManager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dom/push/PushManager.cpp')
-rw-r--r--dom/push/PushManager.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/dom/push/PushManager.cpp b/dom/push/PushManager.cpp
index 74bb4a3d7c..246eef8a55 100644
--- a/dom/push/PushManager.cpp
+++ b/dom/push/PushManager.cpp
@@ -14,7 +14,6 @@
#include "mozilla/dom/PushManagerBinding.h"
#include "mozilla/dom/PushSubscription.h"
#include "mozilla/dom/PushSubscriptionOptionsBinding.h"
-#include "mozilla/dom/PushUtil.h"
#include "mozilla/dom/RootedDictionary.h"
#include "mozilla/dom/ServiceWorker.h"
#include "mozilla/dom/WorkerRunnable.h"
@@ -92,7 +91,7 @@ nsresult GetSubscriptionParams(nsIPushSubscription* aSubscription,
return NS_OK;
}
-class GetSubscriptionResultRunnable final : public WorkerRunnable {
+class GetSubscriptionResultRunnable final : public WorkerThreadRunnable {
public:
GetSubscriptionResultRunnable(WorkerPrivate* aWorkerPrivate,
RefPtr<PromiseWorkerProxy>&& aProxy,
@@ -102,7 +101,7 @@ class GetSubscriptionResultRunnable final : public WorkerRunnable {
nsTArray<uint8_t>&& aRawP256dhKey,
nsTArray<uint8_t>&& aAuthSecret,
nsTArray<uint8_t>&& aAppServerKey)
- : WorkerRunnable(aWorkerPrivate, "GetSubscriptionResultRunnable"),
+ : WorkerThreadRunnable("GetSubscriptionResultRunnable"),
mProxy(std::move(aProxy)),
mStatus(aStatus),
mEndpoint(aEndpoint),
@@ -183,7 +182,7 @@ class GetSubscriptionCallback final : public nsIPushSubscriptionCallback {
worker, std::move(mProxy), aStatus, endpoint, mScope,
std::move(mExpirationTime), std::move(rawP256dhKey),
std::move(authSecret), std::move(appServerKey));
- if (!r->Dispatch()) {
+ if (!r->Dispatch(worker)) {
return NS_ERROR_UNEXPECTED;
}
@@ -292,11 +291,11 @@ class GetSubscriptionRunnable final : public Runnable {
nsTArray<uint8_t> mAppServerKey;
};
-class PermissionResultRunnable final : public WorkerRunnable {
+class PermissionResultRunnable final : public WorkerThreadRunnable {
public:
PermissionResultRunnable(PromiseWorkerProxy* aProxy, nsresult aStatus,
PermissionState aState)
- : WorkerRunnable(aProxy->GetWorkerPrivate(), "PermissionResultRunnable"),
+ : WorkerThreadRunnable("PermissionResultRunnable"),
mProxy(aProxy),
mStatus(aStatus),
mState(aState) {
@@ -351,7 +350,7 @@ class PermissionStateRunnable final : public Runnable {
// This can fail if the worker thread is already shutting down, but there's
// nothing we can do in that case.
- Unused << NS_WARN_IF(!r->Dispatch());
+ Unused << NS_WARN_IF(!r->Dispatch(mProxy->GetWorkerPrivate()));
return NS_OK;
}