Skip to content

Streams step calls clean-up #36906

@gterzian

Description

@gterzian

The streams spec follows a calling convention where ! means unwrap(or just call a function that does not return a result) and ? means result?. We haven't followed this consistently, so it would be good to go over our implementations and try to allign with the spec.

How to do it:

  1. Pick one interface IDL at https://streams.spec.whatwg.org/#idl-index, for example ReadableStream
  2. Pick a public member of that interface, for example cancel
  3. Go through the spec, and look at the calls, such as ! [IsReadableStreamLocked](https://streams.spec.whatwg.org/#is-readable-stream-locked)([this](https://webidl.spec.whatwg.org/#this))
  4. Compare them with out implemenation, and adjust it if needed.
  5. Run mach test-wpt /streams/, the goal being not breaking anything. If anything breaks, please open an issue for it.

Note this can be done in a loop, I suggest one fix per PR.

Our implementations of a public member can be found by searching in the code for the spec link such as https://streams.spec.whatwg.org/#rs-cancel

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-content/scriptRelated to the script threadB-metaThis issue tracks the status of multiple, related pieces of workE-less-complexStraightforward. Recommended for a new contributor.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions