summaryrefslogtreecommitdiffstats
path: root/dom/promise/Promise.cpp
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:43:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:43:14 +0000
commit8dd16259287f58f9273002717ec4d27e97127719 (patch)
tree3863e62a53829a84037444beab3abd4ed9dfc7d0 /dom/promise/Promise.cpp
parentReleasing progress-linux version 126.0.1-1~progress7.99u1. (diff)
downloadfirefox-8dd16259287f58f9273002717ec4d27e97127719.tar.xz
firefox-8dd16259287f58f9273002717ec4d27e97127719.zip
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/promise/Promise.cpp')
-rw-r--r--dom/promise/Promise.cpp8
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,