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

Spec compatibility for iteratorClose condition. #6094

Merged
merged 9 commits into from
Aug 28, 2017

Conversation

yavorsky
Copy link
Member

@yavorsky yavorsky commented Aug 12, 2017

Q                       A
Fixed Issues
Patch: Bug Fix?
Major: Breaking Change?
Minor: New Feature?
Tests Added/Pass? 👍
Spec Compliancy? 👍
License MIT
Doc PR
Any Dependency Changes?

Currently, we are using just ITERATOR_KEY.return in the condition before we are calling iterator.return(), but according to the spec we need to check it for abrupt completion:
!_iteratorNormalCompletion && _iterator.return != null.

Spec ref:
Step 3 - https://tc39.github.io/ecma262/#sec-iteratorclose

Repl:
https://babeljs.io/repl/#?babili=false&evaluate=true&lineWrap=false&presets=es2015&targets=Node-7.3&browsers=ie%2010&builtIns=false&debug=false&code_lz=GYewTgBAFAxiB2BnALhAhhEwIFs0AcBKCAbwF8g&experimental=true&loose=false&spec=false&playground=true&stage=0

@mention-bot
Copy link

@yavorsky, thanks for your PR! By analyzing the history of the files in this pull request, we identified @zenparsing, @hzoo and @existentialism to be potential reviewers.

@loganfsmyth
Copy link
Member

There's also

if (!_n && _i["return"]) _i["return"]();

@hzoo hzoo added the PR: Spec Compliance 👓 A type of pull request used for our changelog categories label Aug 22, 2017
@hzoo hzoo merged commit b2b3d79 into babel:7.0 Aug 28, 2017
@lock lock bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Oct 6, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated A closed issue/PR that is archived due to age. Recommended to make a new issue PR: Spec Compliance 👓 A type of pull request used for our changelog categories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants