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

fix: correct fix for override mistake #409

Merged
merged 1 commit into from
Aug 10, 2020
Merged

Conversation

erights
Copy link
Contributor

@erights erights commented Aug 8, 2020

The override mistake is supposed to emulate the way assignment should have worked in the absence of the override mistake. Before this PR, when an assignment would have created a new property, the emulated assignment creates a property that inherits the enumerability and configurability of the property being overridden. But new properties actually created by assignment don't do that. They start with writable, enumerable, and configurable all true.

This PR still needs tests.

@erights erights requested review from kriskowal and michaelfig August 8, 2020 05:42
Copy link
Member

@michaelfig michaelfig left a comment

Choose a reason for hiding this comment

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

I don't understand this well enough to review. FWIW, it looks good to me.

Copy link

@DavidBruant DavidBruant left a comment

Choose a reason for hiding this comment

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

drive-by review
I agree with the analysis and the fix. Assigned properties that were previously unassigned indeed start with all property descriptors as true

@DavidBruant
Copy link

And also, i think it's beautiful to fix the override mistake by enabling ses :-)

@erights erights merged commit b576211 into master Aug 10, 2020
@erights erights deleted the fix-override-mistake-fix branch August 10, 2020 18:25
erights referenced this pull request in nodejs/node Sep 3, 2020
PR-URL: #28254
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
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.

4 participants