summaryrefslogtreecommitdiffstats
path: root/dom/serviceworkers/ServiceWorkerOp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dom/serviceworkers/ServiceWorkerOp.cpp')
-rw-r--r--dom/serviceworkers/ServiceWorkerOp.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/dom/serviceworkers/ServiceWorkerOp.cpp b/dom/serviceworkers/ServiceWorkerOp.cpp
index 9c4fc569d1..2b11742c6c 100644
--- a/dom/serviceworkers/ServiceWorkerOp.cpp
+++ b/dom/serviceworkers/ServiceWorkerOp.cpp
@@ -278,8 +278,7 @@ class ServiceWorkerOp::ServiceWorkerOpRunnable final
ServiceWorkerOpRunnable(RefPtr<ServiceWorkerOp> aOwner,
WorkerPrivate* aWorkerPrivate)
- : WorkerDebuggeeRunnable(aWorkerPrivate, "ServiceWorkerOpRunnable",
- WorkerThread),
+ : WorkerDebuggeeRunnable("ServiceWorkerOpRunnable"),
mOwner(std::move(aOwner)) {
AssertIsOnMainThread();
MOZ_ASSERT(mOwner);
@@ -320,7 +319,7 @@ class ServiceWorkerOp::ServiceWorkerOpRunnable final
};
NS_IMPL_ISUPPORTS_INHERITED0(ServiceWorkerOp::ServiceWorkerOpRunnable,
- WorkerRunnable)
+ WorkerThreadRunnable)
bool ServiceWorkerOp::MaybeStart(RemoteWorkerChild* aOwner,
RemoteWorkerChild::State& aState) {
@@ -403,10 +402,11 @@ void ServiceWorkerOp::StartOnMainThread(RefPtr<RemoteWorkerChild>& aOwner) {
auto lock = aOwner->mState.Lock();
MOZ_ASSERT(lock->is<Running>());
- RefPtr<WorkerRunnable> workerRunnable =
+ RefPtr<WorkerThreadRunnable> workerRunnable =
GetRunnable(lock->as<Running>().mWorkerPrivate);
- if (NS_WARN_IF(!workerRunnable->Dispatch())) {
+ if (NS_WARN_IF(
+ !workerRunnable->Dispatch(lock->as<Running>().mWorkerPrivate))) {
RejectAll(NS_ERROR_FAILURE);
}
}
@@ -452,7 +452,7 @@ bool ServiceWorkerOp::IsTerminationOp() const {
ServiceWorkerOpArgs::TServiceWorkerTerminateWorkerOpArgs;
}
-RefPtr<WorkerRunnable> ServiceWorkerOp::GetRunnable(
+RefPtr<WorkerThreadRunnable> ServiceWorkerOp::GetRunnable(
WorkerPrivate* aWorkerPrivate) {
AssertIsOnMainThread();
MOZ_ASSERT(aWorkerPrivate);
@@ -522,7 +522,7 @@ class UpdateServiceWorkerStateOp final : public ServiceWorkerOp {
UpdateStateOpRunnable(RefPtr<UpdateServiceWorkerStateOp> aOwner,
WorkerPrivate* aWorkerPrivate)
- : MainThreadWorkerControlRunnable(aWorkerPrivate),
+ : MainThreadWorkerControlRunnable("UpdateStateOpRunnable"),
mOwner(std::move(aOwner)) {
AssertIsOnMainThread();
MOZ_ASSERT(mOwner);
@@ -559,7 +559,8 @@ class UpdateServiceWorkerStateOp final : public ServiceWorkerOp {
~UpdateServiceWorkerStateOp() = default;
- RefPtr<WorkerRunnable> GetRunnable(WorkerPrivate* aWorkerPrivate) override {
+ RefPtr<WorkerThreadRunnable> GetRunnable(
+ WorkerPrivate* aWorkerPrivate) override {
AssertIsOnMainThread();
MOZ_ASSERT(aWorkerPrivate);
MOZ_ASSERT(mArgs.type() ==