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 /js/src/vm/InternalThreadPool.cpp | |
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 'js/src/vm/InternalThreadPool.cpp')
-rw-r--r-- | js/src/vm/InternalThreadPool.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/js/src/vm/InternalThreadPool.cpp b/js/src/vm/InternalThreadPool.cpp index 483e995254..c6cdac1d44 100644 --- a/js/src/vm/InternalThreadPool.cpp +++ b/js/src/vm/InternalThreadPool.cpp @@ -187,7 +187,10 @@ void InternalThreadPool::DispatchTask(JS::DispatchReason reason) { } void InternalThreadPool::dispatchTask(JS::DispatchReason reason) { - gHelperThreadLock.assertOwnedByCurrentThread(); + // This could now use a separate mutex like TaskController, but continues to + // use the helper thread state lock for convenience. + AutoLockHelperThreadState lock; + queuedTasks++; if (reason == JS::DispatchReason::NewTask) { wakeup.notify_one(); @@ -279,7 +282,9 @@ void HelperThread::threadLoop(InternalThreadPool* pool) { while (!pool->terminating) { if (pool->queuedTasks != 0) { pool->queuedTasks--; - HelperThreadState().runOneTask(lock); + + AutoUnlockHelperThreadState unlock(lock); + JS::RunHelperThreadTask(); continue; } |