tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 46fc23ce550d665431bfe76e6fa7301cc2b17a89
parent 52e447e5854d0298d1a9545e1e4941ff2df33beb
Author: Cristina Horotan <chorotan@mozilla.com>
Date:   Sat, 13 Dec 2025 01:22:50 +0200

Revert "Bug 2005449 - Handle failure to unwrap JS microtask r=bthrall" for causing SM failures on dead-job.js DONTBUILD

This reverts commit 78b6d650695f1f3c70b2cc7ea230fb54e33b6bad.

Diffstat:
Djs/src/jit-test/tests/js_microtask/dead-job.js | 23-----------------------
Mjs/src/shell/js.cpp | 8+-------
2 files changed, 1 insertion(+), 30 deletions(-)

diff --git a/js/src/jit-test/tests/js_microtask/dead-job.js b/js/src/jit-test/tests/js_microtask/dead-job.js @@ -1,23 +0,0 @@ -function b(global) { - var resolve; - new Promise(d => resolve = d).then(global.Function) - resolve() - - caught = false; - try { - globalOfFirstJobInQueue() - } catch (exception) { - caught = true; - assertEq(exception.message.includes("dead object"), true); - } - assertEq(caught, true); -} - -let g1 = newGlobal() -let g2 = newGlobal({ - newCompartment: true -}) - -nukeAllCCWs() - -b(g2) diff --git a/js/src/shell/js.cpp b/js/src/shell/js.cpp @@ -1519,13 +1519,7 @@ static bool GlobalOfFirstJobInQueue(JSContext* cx, unsigned argc, Value* vp) { auto& genericJob = cx->microTaskQueues->microTaskQueue.front(); JS::JSMicroTask* job = JS::ToUnwrappedJSMicroTask(genericJob); - if (!job) { - JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, - JSMSG_DEAD_OBJECT); - - return false; - } - + MOZ_ASSERT(job); RootedObject global(cx, JS::GetExecutionGlobalFromJSMicroTask(job)); if (!global) { JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr,