stream: reject primitive values in ReadableStream.from - #65676
Closed
standard-Chan wants to merge 1 commit into
Closed
stream: reject primitive values in ReadableStream.from#65676standard-Chan wants to merge 1 commit into
standard-Chan wants to merge 1 commit into
Conversation
Collaborator
|
Review requested:
|
Reject non-object inputs before looking up iterator methods in ReadableStream.from(). This matches the Web IDL async sequence conversion and prevents primitive strings from being accepted through property-access boxing. This fixes the WPT test: "ReadableStream.from throws on invalid iterables; specifically a string" Refs: https://webidl.spec.whatwg.org/#es-sequence Signed-off-by: Jeong SeokChan <starp321@naver.com>
standard-Chan
force-pushed
the
fix-readable-stream-wpt
branch
from
August 31, 2026 09:17
095cd5f to
d41a8e0
Compare
Contributor
Contributor
Author
Codecov Reportβ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #65676 +/- ##
==========================================
+ Coverage 90.06% 90.11% +0.05%
==========================================
Files 754 754
Lines 255759 256313 +554
Branches 48327 48515 +188
==========================================
+ Hits 230350 230988 +638
+ Misses 16534 16450 -84
Partials 8875 8875
π New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This updates
ReadableStream.from()to reject primitive values before looking up iterator methods.WHATWG Streams changed
ReadableStream.from()to use the Web IDLasync_sequence<T>type (added in whatwg#1372)That makes string inputs invalid because Web IDL sequence conversion requires non-object values to throw a
TypeError:spec es-sequence
WPT added coverage for this behavior here: web-platform-tests/wpt#59594
This change aligns Node.js with that WPT expectation and removes the corresponding expected failure for test (ReadableStream.from throws on invalid iterables; specifically a string)
Tests: