New issue
Advanced search Search tips

Issue 632980 link

Starred by 4 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug

Blocked on:
issue 839389


Participants' hotlists:
Hotlist-Bindings-IDLCompiler


Sign in to add a comment

Setting Proxy as a prototype breaks NamedNodeMap

Reported by onlylog...@gmail.com, Jul 30 2016

Issue description

UserAgent: 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
 
test_proxy_namednodemap.html
909 bytes View Download

Comment 1 by kojii@chromium.org, Aug 1 2016

Components: -Blink Blink>Bindings
Labels: -OS-Linux OS-All
Not only NamedNodeMap is affected, but basically everything that implements named property getters
Owner: peria@chromium.org
Status: Assigned (was: Unconfirmed)
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?

Comment 4 by peria@chromium.org, May 9 2017

Yes, I'll take a look.

Comment 5 by peria@chromium.org, May 3 2018

Blockedon: 839389

Comment 6 by peria@chromium.org, May 25 2018

Labels: Hotlist-Bindings-IDLCompiler

Sign in to add a comment