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

Proxy [[Enumerate]]: exhaust iterator and throw on non-strings. #280

Closed
wants to merge 1 commit into from

Conversation

GeorgNeis
Copy link
Contributor

See:
#160
#161

1. If _next_ is *false*, return CreateArrayIterator(_array_, `"value"`).
1. Let _nextValue_ be ? IteratorValue(_next_).
1. If Type(_nextValue_) is not String, throw a *TypeError* exception.
1. Let _status_ be ? CreateDataProperty(_array_, ToString(ToUint32(_nextIndex_)), _nextValue_).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since CreateDataProperty can't throw, I'd say replace ? with !. It might also be more clear to say: Perform ! CreateDataPropertyOrThrow... and remove the next line.

@bterlson
Copy link
Member

Also, if you are not a TC39 member, please follow the guidelines at the bottom of the contributing.md file (namely, fill this out: http://www.ecma-international.org/memento/register_TC39_Royalty_Free_Task_Group.php)

@bterlson
Copy link
Member

Talked to @littledan and I also see your @ chromium email address. You're covered, no need to sign that form. Thanks!

@GeorgNeis
Copy link
Contributor Author

Thanks for the feedback. I made the suggested change.

@bterlson
Copy link
Member

Looks good, thanks!

@bterlson
Copy link
Member

Committed as 26aabf6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants