Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ext/web): ReadableStream.from() allows Iterable instead of IterableIterator #23903

Merged
merged 7 commits into from
May 27, 2024
Next Next commit
fix(ext/web): ReadableStream.from() async from iterator
`createAsyncFromSyncIterator(x)` expects `x` as `Iterable` but, previous
implements specify `Iterator` or `IterableIterator`. If it was
`IterableIterator`, it would work, but if it was `Iterator`, an
exception will occur.

Tests have been merged into WPT.
web-platform-tests/wpt#46365
  • Loading branch information
Milly committed May 20, 2024
commit 9e375d9dff021efececd926528a5b264451a335e
2 changes: 1 addition & 1 deletion ext/web/06_streams.js
Original file line number Diff line number Diff line change
Expand Up @@ -5100,7 +5100,7 @@ function getIterator(obj, async = false) {
if (obj[SymbolIterator] === undefined) {
throw new TypeError("No iterator found");
}
return createAsyncFromSyncIterator(obj[SymbolIterator]());
return createAsyncFromSyncIterator(obj);
} else {
return obj[SymbolAsyncIterator]();
}
Expand Down