Skip to content

streams: use Web IDL "a promise resolved with" semantics for callback results - #32620

Closed
alii wants to merge 8 commits into
mainfrom
ali/streams-webidl-promise-resolved-with
Closed

streams: use Web IDL "a promise resolved with" semantics for callback results#32620
alii wants to merge 8 commits into
mainfrom
ali/streams-webidl-promise-resolved-with

streams: catch-and-reject in shieldingPromiseResolve's assimilation job

78d7e70
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Jun 23, 2026 in 38m 38s

Code review found 1 potential issue

Found 1 candidates, confirmed 1. See review comments for details.

Details

Severity Count
🔴 Important 0
🟡 Nit 1
🟣 Pre-existing 0
Severity File:Line Issue
🟡 Nit src/js/builtins/WritableStreamInternals.ts:635-641 TransformerStartCallback path has the same any-return over-wrap this PR fixed for UnderlyingSinkStartCallback

Annotations

Check warning on line 641 in src/js/builtins/WritableStreamInternals.ts

See this annotation in the file changed.

@claude claude / Claude Code Review

TransformerStartCallback path has the same any-return over-wrap this PR fixed for UnderlyingSinkStartCallback

The same "IDL return type is `any`, no promise conversion" rationale applies to `TransformerStartCallback`: `TransformStream.ts:81-90` still does `$promiseInvokeOrNoopMethodNoCatch(transformer, start, [controller]).$then(() => startPromiseCapability.resolve())` instead of the spec's direct `Resolve(startPromise, startResult)`, so for `new TransformStream({ start: () => Promise.resolve() })` the writable's `[[started]]` flips at tick 5 vs spec tick 4. Not a regression in net (pre-PR was tick 2 —