diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:43:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:43:14 +0000 |
commit | 8dd16259287f58f9273002717ec4d27e97127719 (patch) | |
tree | 3863e62a53829a84037444beab3abd4ed9dfc7d0 /dom/workers/WorkerThread.h | |
parent | Releasing progress-linux version 126.0.1-1~progress7.99u1. (diff) | |
download | firefox-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/workers/WorkerThread.h')
-rw-r--r-- | dom/workers/WorkerThread.h | 11 |
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); |