-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
[BUGFIX beta] Mandatory setter should check prototype descriptors. #12314
Conversation
@stefanpenner / @krisselden - For review... |
r? @krisselden |
@krisselden - Do you have a chance to review? |
yes this looks good, |
quick chat with @krisselden, he raised that this does not walk the proto chain correctly. Which can cause us to accidentally miss + smash inherited accessors. This will likely cause another perf hit, but I suspect we may want to pursue it. @krisselden im curious if you have any other ideas. |
Sounds good. Thanks for the feedback. I'll start with some more tests with deeper inheritance. |
@rwjblue do you need help with this? |
02fb09b
to
d54a193
Compare
Updated with a few more tests (now we test 1, 2, and 3 level's of nesting) and an implementation that walks upwards until it either finds a descriptor for the given key name or reaches a Ready for review again (sorry for the delay)... |
d54a193
to
d5ce5ee
Compare
Prior to this change, a setter that exists on the prototype of the object was not detected and was effectively clobbered. This change updates `handleMandatorySetter` to check both the objects own descriptors and its prototypes descriptors. Also removed the guard for `Object.getOwnPropertyDescriptor` since all supported platforms are ES5.
d5ce5ee
to
9d3a62d
Compare
@krisselden / @stefanpenner - The previously mentioned concerns are addressed, this is ready for (hopefully) final review.... |
this looks good, I'm sad that this will likely make dev mode slower, but I am unclear how else to proceed. |
[BUGFIX beta] Mandatory setter should check prototype descriptors.
Prior to this change, a setter that exists on the prototype of the object was not detected and was effectively clobbered.
This change updates
handleMandatorySetter
to check both the objects own descriptors and its prototypes descriptors.Also removed the guard for
Object.getOwnPropertyDescriptor
since all supported platforms are ES5.