Closed Bug 1900681 Opened 4 months ago Closed 4 months ago

XMLHttpRequestMainThread::DisconnectFromOwner should not call Abort for `mForWorker` XHRs because it double-clocks the state machine

Categories

(Core :: DOM: Networking, defect, P2)

defect

Tracking

()

RESOLVED FIXED
129 Branch
Tracking Status
firefox129 --- fixed

People

(Reporter: asuth, Assigned: asuth)

Details

(Whiteboard: [necko-triaged])

Attachments

(1 file)

When looking at a weird stack trace :jmarshall was getting from the WorkerRef debugging logic for XHRs I noticed that an unintentional aspect of the worker XHR creating a main-thread XHR on its owning window's global is that we will get DisconnectFromOwner notifications from the window that will race the worker teardown which I do not believe were anticipated / compensated for inside the worker XHR implementation. It's a straightforward fix for us to not call Abort in that case.

We don't want the XHRMT to self-Abort() when the XHRWT state machine
is built assuming this doesn't happen. This is likely the source of a
number of weird hangs and crashes we have hardened the implementation
against in the past, and potentially still some ongoing hangs and
weirdness.

Severity: -- → S3
Priority: -- → P2
Whiteboard: [necko-triaged]
Pushed by bugmail@asutherland.org: https://hg.mozilla.org/integration/autoland/rev/8e8ee3fc21c3 Worker XHR self-manages XHRMT lifecycle. r=dom-worker-reviewers,smaug
Status: ASSIGNED → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → 129 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: