Open Bug 1856103 Opened 2 years ago Updated 2 years ago

Implement TransformStream cleanup using "transformer.cancel"

Categories

(Core :: DOM: Streams, enhancement)

enhancement

Tracking

()

ASSIGNED

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

Depends on: 1837447
Summary: Implement TransformStream cleanup using "transformer.cleanup" → Implement TransformStream cleanup using "transformer.cancel"
Keywords: dev-doc-needed
Assignee: nobody → evilpies
Attached file WIP: Bug 1856103

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!

Flags: needinfo?(krosylight)

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.

Flags: needinfo?(krosylight)
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Depends on: 1860083

Maybe we should just do this and accept one test failure? On the other hand it looks like no other browser implemented this either.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: