pipeTo with an aborted signal does not abort in a certain case
Categories
(Core :: DOM: Streams, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox102 | --- | fixed |
People
(Reporter: saschanaz, Assigned: saschanaz)
References
Details
Attachments
(1 file)
let a = new AbortController()
a.abort()
let b = new File(['ó ¬a'], 'a', {})
let c = new WritableStream()
await b.stream().tee()[0].pipeTo(c, { 'signal': a.signal })
This rejects right away on Chrome but never rejects on Gecko.
The problem seems to be related to the promise returned from ReadableStreamCancel
never resolving.
I think I've got it. For a tee'd stream to resolve both streams need to be canceled. https://streams.spec.whatwg.org/#abstract-opdef-readablestreamdefaulttee Step 14.3.3.
Comment 3•3 years ago
|
||
So this can be resolved as invalid?
Assignee | ||
Comment 4•3 years ago
|
||
Check the reference implementation behavior and file a spec bug if it also rejects right away as Chrome does?
Updated•3 years ago
|
Assignee | ||
Comment 5•3 years ago
•
|
||
The reference test has no File.stream 😬
I feel like it's the File method that is problematic here (either in Gecko or Blink), but I'm not anywhere yet to pinpoint.
Edit 1: Okay, comment #2 was right, canceling another branch does resolve it.
Edit 2: I successfully reproduced this with user-defined readable byte stream. The reference implementation shows the same behavior with Gecko, so this is Blink issue. I'll add a WPT test soon.
Assignee | ||
Comment 6•3 years ago
|
||
This passes on Gecko and the reference implementation but not on Chrome.
Comment 10•3 years ago
|
||
bugherder |
Description
•