summaryrefslogtreecommitdiffstats
path: root/dom/workers/WorkerThread.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:35:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:35:29 +0000
commit59203c63bb777a3bacec32fb8830fba33540e809 (patch)
tree58298e711c0ff0575818c30485b44a2f21bf28a0 /dom/workers/WorkerThread.h
parentAdding upstream version 126.0.1. (diff)
downloadfirefox-59203c63bb777a3bacec32fb8830fba33540e809.tar.xz
firefox-59203c63bb777a3bacec32fb8830fba33540e809.zip
Adding upstream version 127.0.upstream/127.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/workers/WorkerThread.h')
-rw-r--r--dom/workers/WorkerThread.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/dom/workers/WorkerThread.h b/dom/workers/WorkerThread.h
index 06624f60c1..8da085b51b 100644
--- a/dom/workers/WorkerThread.h
+++ b/dom/workers/WorkerThread.h
@@ -25,9 +25,6 @@ namespace dom {
class WorkerRunnable;
class WorkerPrivate;
-template <class>
-class WorkerPrivateParent;
-
namespace workerinternals {
class RuntimeService;
}
@@ -38,7 +35,6 @@ class RuntimeService;
class WorkerThreadFriendKey {
friend class workerinternals::RuntimeService;
friend class WorkerPrivate;
- friend class WorkerPrivateParent<WorkerPrivate>;
WorkerThreadFriendKey();
~WorkerThreadFriendKey();
@@ -76,6 +72,13 @@ class WorkerThread final : public nsThread {
void SetWorker(const WorkerThreadFriendKey& aKey,
WorkerPrivate* aWorkerPrivate);
+ // This method is used to decouple the connection with the WorkerPrivate which
+ // is set in SetWorker(). And it also clears all pending runnables on this
+ // WorkerThread.
+ // After decoupling, WorkerThreadRunnable can not run on this WorkerThread
+ // anymore, since WorkerPrivate is invalid.
+ void ClearEventQueueAndWorker(const WorkerThreadFriendKey& aKey);
+
nsresult DispatchPrimaryRunnable(const WorkerThreadFriendKey& aKey,
already_AddRefed<nsIRunnable> aRunnable);