Closed Bug 2070925 Opened 3 days ago Closed 2 days ago

setDebuggerReady(false) suspends nothing: the DispatchLockHeld hold is unsatisfiable

Categories

(Core :: DOM: Workers, defect)

defect

Tracking

()

RESOLVED FIXED
158 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox-esr140 --- wontfix
firefox-esr153 --- wontfix
firefox156 --- wontfix
firefox157 --- wontfix
firefox158 --- fixed

People

(Reporter: florian, Assigned: florian)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: regression)

Attachments

(1 file)

nsIWorkerDebugger.setDebuggerReady(false) is documented to prevent all content from running in a worker, so that a debugger which has not finished attaching can hold the worker until it is ready. It holds nothing. The gate in WorkerPrivate::DispatchLockHeld is never taken, so a late attach silently loses whatever ran first.

Bug 1899503 replaced a single condition with a conjunction where a disjunction was intended. !mDebuggerReady && !mRemoteDebuggerReady can never both hold: mDebuggerReady is only cleared through the local WorkerDebugger, which a worker only has when UseRemoteDebugger() is false.

Reactivating a hold that has been dead since bug 1899503 is not risk-free. Nothing in CI exercises it, and the MOZ_RELEASE_ASSERT(!aSyncLoopTarget) inside it goes live again.

The hold suspended nothing: !mDebuggerReady && !mRemoteDebuggerReady can never
both be true, since the two flags are cleared on mutually exclusive
UseRemoteDebugger() branches. So no debuggee runnable has been queued since
Bug 1899503.

Restoring the hold means the three flush sites drop the mDebuggerRegistered term,
which a remote worker never sets, and which RegisterDebuggerMainThread has
normally already set for a local one.

Set release status flags based on info from the regressing bug 1899503

Pushed by fqueze@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/52f64e7e39f8 https://hg.mozilla.org/integration/autoland/rev/abae7abb41ea Make setDebuggerReady(false) suspend the debuggee again, r=edenchuang,dom-worker-reviewers.
Status: ASSIGNED → RESOLVED
Closed: 2 days ago
Resolution: --- → FIXED
Target Milestone: --- → 158 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: