-
Notifications
You must be signed in to change notification settings - Fork 29.4k
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
stream: treat null asyncIterator as undefined #55119
Conversation
Review requested:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to the spec, getIterator should normalize incoming method to
undefined if it is either undefined or null.
Where is this? The tc39 link in the PR specifically does not mentioned null?
Let method be ? [GetMethod](https://tc39.es/ecma262/#sec-getmethod)(obj, [%Symbol.asyncIterator%](https://tc39.es/ecma262/#sec-well-known-symbols)).
b. If method is undefined, then
i. Let syncMethod be ? [GetMethod](https://tc39.es/ecma262/#sec-getmethod)(obj, [%Symbol.iterator%](https://tc39.es/ecma262/#sec-well-known-symbols)).
ii. If syncMethod is undefined, throw a TypeError exception.
edit: it's in GetMethod:
If func is either undefined or null, return undefined.
It is in the getMethod
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #55119 +/- ##
==========================================
- Coverage 88.25% 88.24% -0.01%
==========================================
Files 651 651
Lines 183856 183858 +2
Branches 35850 35854 +4
==========================================
- Hits 162259 162248 -11
- Misses 14888 14893 +5
- Partials 6709 6717 +8
|
According to the spec, getIterator should normalize incoming method to undefined if it is either undefined or null. This PR enforces that spec compliance with passed WPT.
cf44066
to
0a4ffe8
Compare
Landed in 87a79cd |
According to the spec, getIterator should normalize incoming method to undefined if it is either undefined or null. This PR enforces that spec compliance with passed WPT. PR-URL: #55119 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Matthew Aitken <maitken033380023@gmail.com> Reviewed-By: Mattias Buelens <mattias@buelens.com>
According to the spec, getIterator should normalize incoming method to undefined if it is either undefined or null. This PR enforces that spec compliance with passed WPT. PR-URL: #55119 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Matthew Aitken <maitken033380023@gmail.com> Reviewed-By: Mattias Buelens <mattias@buelens.com>
According to the spec, getIterator should normalize incoming method to
undefined if it is either undefined or null. This PR enforces that spec
compliance with passed WPT.