Closed Bug 1748146 Opened 4 years ago Closed 4 years ago

Too much recursion error in /streams/writable-streams/aborting.any.worker.html

Categories

(Core :: DOM: Streams, defect)

defect

Tracking

()

RESOLVED FIXED
97 Branch
Tracking Status
firefox97 --- fixed

People

(Reporter: evilpies, Assigned: saschanaz)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

When running this test we get a "too much recursion" error.

This seems to be caused by firing the signal's abort event synchronously with writer.abort(e2), while inside the abort event listener. Not sure if this is a test issue or if the event should be dispatched differently or something else entirely.

Aborting an already aborted writer should do nothing I guess?

The "should do nothing" part is in https://dom.spec.whatwg.org/#abortsignal-signal-abort

If signal is aborted, then return.

AbortSignal::SignalAbort should return early but current only AbortSignalImpl::SignalAbort does.

AbortSignal::SignalAbort should return early but current only AbortSignalImpl::SignalAbort does.

Nice! Sounds like we can just add an early return before calling AbortSignalImpl::SignalAbort. I do wonder why that method doesn't dispatch the "abort" event as well.

I believe it's because the impl one is only for internal use. Do you want to work on this?

(I will)

Assignee: nobody → krosylight

Currently only AbortSignalImpl::SignalAbort returns early. Both can be called directly, so both should return early.

Currently not really testable since this is only problematic in dom/streams and it's still hidden by a build flag.

Pushed by krosylight@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f6b75d021d28 Return early in AbortSignal::SignalAbort r=smaug
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 97 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: