Implement TransformStream cleanup using "transformer.cancel"
Categories
(Core :: DOM: Streams, enhancement)
Tracking
()
People
(Reporter: lucacasonato, Assigned: evilpies)
References
(Depends on 1 open bug)
Details
(Keywords: dev-doc-needed)
Attachments
(1 file)
The Streams specification has been updated with support for a hook to cleanup a TransformStream on error / abort. See https://github.com/whatwg/streams/pull/1283. WPTs are available: https://github.com/web-platform-tests/wpt/pull/40453
| Reporter | ||
Updated•2 years ago
|
Updated•2 years ago
|
| Assignee | ||
Updated•2 years ago
|
| Assignee | ||
Comment 1•2 years ago
|
||
| Assignee | ||
Comment 2•2 years ago
|
||
I've run into a test failure that I think might be a specification issue or maybe a difference in how the promise resolution happens: https://github.com/whatwg/streams/issues/1296. I see that your reviewed the initial pull request and I think you have a better understanding of promises in general. Please have a look, thanks!
Comment 3•2 years ago
•
|
||
Okay, so the earlier test 'closing the writable side should reject if a parallel transformer.cancel() throws' works because that hits TransformStreamDefaultSourceCancelAlgorithm step 7.2.3, but this failing test never throws because when cancelPromise is resolved, the writable stream's start promise is somehow still not resolved and thus hasn't called FinishErroring. But not sure how cancel promise responds first before start promise?
I also commented on the issue.
| Assignee | ||
Updated•2 years ago
|
| Assignee | ||
Comment 4•2 years ago
|
||
Maybe we should just do this and accept one test failure? On the other hand it looks like no other browser implemented this either.
Description
•