Loading js/src/jit-test/tests/basic/bug1412298.js 0 → 100644 +6 −0 Original line number Diff line number Diff line if (helperThreadCount() === 0) quit(); evalInCooperativeThread(` const dbg = new Debugger(); evalInWorker(""); `); js/src/shell/js.cpp +7 −7 Original line number Diff line number Diff line Loading @@ -3925,6 +3925,13 @@ KillWorkerThreads(JSContext* cx) { MOZ_ASSERT_IF(!CanUseExtraThreads(), workerThreads.empty()); // Yield until all other cooperative threads in the main runtime finish. while (cooperationState->numThreads) { CooperativeBeginWait(cx); CooperativeYield(); CooperativeEndWait(cx); } if (!workerThreadsLock) { MOZ_ASSERT(workerThreads.empty()); return; Loading @@ -3947,13 +3954,6 @@ KillWorkerThreads(JSContext* cx) js_delete(workerThreadsLock); workerThreadsLock = nullptr; // Yield until all other cooperative threads in the main runtime finish. while (cooperationState->numThreads) { CooperativeBeginWait(cx); CooperativeYield(); CooperativeEndWait(cx); } js_delete(cooperationState); cooperationState = nullptr; } Loading Loading
js/src/jit-test/tests/basic/bug1412298.js 0 → 100644 +6 −0 Original line number Diff line number Diff line if (helperThreadCount() === 0) quit(); evalInCooperativeThread(` const dbg = new Debugger(); evalInWorker(""); `);
js/src/shell/js.cpp +7 −7 Original line number Diff line number Diff line Loading @@ -3925,6 +3925,13 @@ KillWorkerThreads(JSContext* cx) { MOZ_ASSERT_IF(!CanUseExtraThreads(), workerThreads.empty()); // Yield until all other cooperative threads in the main runtime finish. while (cooperationState->numThreads) { CooperativeBeginWait(cx); CooperativeYield(); CooperativeEndWait(cx); } if (!workerThreadsLock) { MOZ_ASSERT(workerThreads.empty()); return; Loading @@ -3947,13 +3954,6 @@ KillWorkerThreads(JSContext* cx) js_delete(workerThreadsLock); workerThreadsLock = nullptr; // Yield until all other cooperative threads in the main runtime finish. while (cooperationState->numThreads) { CooperativeBeginWait(cx); CooperativeYield(); CooperativeEndWait(cx); } js_delete(cooperationState); cooperationState = nullptr; } Loading