Implement ReadableStream.from - #32533
Closed
robobun wants to merge 6 commits into
Closed
Claude / Claude Code Review
completed
Jun 20, 2026 in 21m 1s
Code review found 1 important issue
Found 5 candidates, confirmed 1. See review comments for details.
Details
| Severity | Count |
|---|---|
| 🔴 Important | 1 |
| 🟡 Nit | 0 |
| 🟣 Pre-existing | 0 |
| Severity | File:Line | Issue |
|---|---|---|
| 🔴 Important | src/js/builtins/ReadableStream.ts:151-153 |
Sync iterator not closed when yielded promise value rejects (missing closeOnRejection) |
Annotations
Check failure on line 153 in src/js/builtins/ReadableStream.ts
claude / Claude Code Review
Sync iterator not closed when yielded promise value rejects (missing closeOnRejection)
When a sync iterator yields a rejected promise (`done:false`), the `await iterResult.value` here throws and `pull()` rejects, erroring the stream — but `iterator.return()` is never called. Per spec, `%AsyncFromSyncIteratorPrototype%.next` runs `AsyncFromSyncIteratorContinuation` with `closeOnRejection=true`, which performs `IteratorClose` on the underlying sync iterator before propagating the rejection, so a sync generator's `finally` block should run here but won't. Wrapping the sync `await` in
Loading