Skip to content

ReadableStream: finish default controller and reader impl #32898

@gterzian

Description

@gterzian

Follow-up on #32730, and needs to target https://github.com/servo/servo/tree/readablestream-re-implementation

TODO:

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 actual DomRoot<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, and stop_reading(mostly, or only, used in components/script/body.rs).
  • Optimize get_in_memory_bytes

Related to public JS methods of ReadableStream:

Related to ReadableStreamDefaultController:

Related to ReadableStreamDefaultReader:

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-content/scriptRelated to the script threadB-metaThis issue tracks the status of multiple, related pieces of work

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions