Setting Proxy as a prototype breaks NamedNodeMap
Reported by
onlylog...@gmail.com,
Jul 30 2016
|
||||
Issue descriptionUserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36 Steps to reproduce the problem: 1. Open the attached file 2. Look at the console What is the expected behavior? Changing prototype of a NamedNodeMap instance should not affect values of own properties, so values before and after changing the prototype should be the same. What went wrong? After changing object's prototype to a Proxy instance, we loose access to some properties, which are object's own properties and therefore should not be affected by changing prototype. The property "test" in this NamedNodeMap instance (attributes of a newly created div) is inaccessible. We can get it's value only via getOwnPropertyDescriptor. Also, "in" operator returns false, while hasOwnProperty returns true, which is incorrect. Did this work before? N/A Chrome version: 52.0.2743.82 Channel: stable OS Version: Flash Version: Note that even if we change the prototype to null, it still works as it should, only changing prototype to a Proxy instance causes it to misbehave. This works as expected in Firefox, and doesn't work in chromium 54
,
Aug 3 2016
Not only NamedNodeMap is affected, but basically everything that implements named property getters
,
May 8 2017
Triager here: confirmed that this still happens. Suspect the issue might be in the V8 interceptors implementation (in which case the fix would be on that side), but haven't debugged enough to figure out what's going on during property lookup here. peria, might you have a chance to look at this some time?
,
May 9 2017
Yes, I'll take a look.
,
May 3 2018
,
May 25 2018
|
||||
►
Sign in to add a comment |
||||
Comment 1 by kojii@chromium.org
, Aug 1 2016Labels: -OS-Linux OS-All