Skip to content

Implement proper Symbol.toStringTag for iterators #580

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

Merged
merged 1 commit into from
Oct 7, 2024

Conversation

saghul
Copy link
Contributor

@saghul saghul commented Oct 7, 2024

No description provided.

@saghul saghul requested a review from bnoordhuis October 7, 2024 14:50
// This is home.
return JS_ThrowTypeError(ctx, "Cannot assign to read only property");
}
res = JS_GetOwnProperty(ctx, NULL, this_val, JS_ATOM_Symbol_toStringTag);
Copy link
Contributor

Choose a reason for hiding this comment

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

For my curiosity: the JS_GetOwnProperty is because it's observable?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, AFAICT. The spec says to get the descriptor and either set or define a new property based on its presence.

@saghul saghul merged commit acc0dd9 into master Oct 7, 2024
52 checks passed
@saghul saghul deleted the iterator-stringtag branch October 7, 2024 19:39
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