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

replace RequireObjectCoercible with Object check #290

Merged
merged 3 commits into from Dec 11, 2023
Merged

Conversation

michaelficarra
Copy link
Member

/cc @anba

@anba
Copy link

anba commented Dec 4, 2023

The Set call will now use the ToObject result as the this-value. (This is visible when an accessor is installed on a prototype.) To correctly mimic normal assignments, Set(O, p, v, true) needs to use O.[[Set]](p, v, this) (plus an additional check when [[Set]] returned false).

@bakkot
Copy link
Collaborator

bakkot commented Dec 4, 2023

What if instead we just throw (or, alternatively, immediately return) if this is not an object?

@michaelficarra michaelficarra changed the title replace RequireObjectCoercible with ToObject replace RequireObjectCoercible with Object check Dec 4, 2023
@michaelficarra michaelficarra merged commit f939dfd into main Dec 11, 2023
1 check passed
@michaelficarra michaelficarra deleted the toobject branch December 11, 2023 18:24
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.

None yet

3 participants