-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
ReadableStream: finish default controller and reader impl #32898
Copy link
Copy link
Closed
Labels
A-content/scriptRelated to the script threadRelated to the script threadB-metaThis issue tracks the status of multiple, related pieces of workThis issue tracks the status of multiple, related pieces of work
Description
Follow-up on #32730, and needs to target https://github.com/servo/servo/tree/readablestream-re-implementation
TODO:
- Fix use of
CanGc. - Use
Domin native promise handlers as per Consistently use Dom in native promise handlers #33604 - Debug so we can get the same pass rate as now on the WPT tests.
Related to how the stream is used "natively" in Rust:
- Remove the current use of
get_js_stream, which should be replaced by returning the actualDomRoot<ReadableStream>. This relates to the "native reading from a stream" workflow. - Restructure the "native reading from a stream" workflow, used by Rust code, so that the code simply uses a
ReadableStreamDefaultReader. The three methods to restructure are:read_a_chunk,start_reading, andstop_reading(mostly, or only, used incomponents/script/body.rs). - Optimize
get_in_memory_bytes
Related to public JS methods of ReadableStream:
- Implement
Locked - Implement
Cancel - Implement tee
- Fix rooting of composite reason when cancelling ReadableStream::tee Fix rooting of composite reason when cancelling ReadableStream::tee #34580 fix: Fix compositeReason for DefaultTeeUnderlyingSource #34627
Related to ReadableStreamDefaultController:
- Check the validity of using
Dom<ReadableStreamDefaultController>in thePullAlgorithmFulfillmentHandler. - Handle fufillment of pull algo promise
- Start algorithm. https://github.com/servo/servo/pull/33586/files#diff-09888dfa911f121670b8b905131455cf548d1816bf65bdeff76fb00f9e55e743R199
- Handle rejection of pull algo promise
- Properly implement
ValueWithSize -
should_pull - use the strategysizealgorithm also here.
- handle close requested
-
close -
error -
GetDesiredSize - Implement the Cancel steps
Related to ReadableStreamDefaultReader:
- Add constructor impl here
- Make the stream mutable, and set it to null when apppropriate(and initially?).
-
readable-stream-reader-generic-release - Proper error types when releasing
-
Closed -
Cancel
Related to all:
- Check the spec for more things to do.
I think the various parts could be done in parallel, items within one part are probably best done in one PR, but could perhaps be separated as well.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-content/scriptRelated to the script threadRelated to the script threadB-metaThis issue tracks the status of multiple, related pieces of workThis issue tracks the status of multiple, related pieces of work