Status: Accepted
Owner: ----
CC: [email protected], [email protected], [email protected], [email protected], [email protected]
Labels: Type-Bug Priority-Medium

New issue 3538 by [email protected]: DOM attributes on prototype chains throw a TypeError when it shouldn't be thrown
https://code.google.com/p/v8/issues/detail?id=3538

I'm trying to move most DOM attributes to prototype chains (https://codereview.chromium.org/447523003/). It's working in almost all cases, but it breaks a couple of tests in a very strange way.

I minimized the test cases here:
https://codereview.chromium.org/502333003

Specifically, if I move HTMLCollection.children to a prototype chain, the following code throws a TypeError:

e = document.createElement("div");
console.log(e.children.item(0));  // This does not throw.
console.log(e.children.length);  // This throws a TypeError.

Note that DOM methods are already defined on prototype chains. They don't throw. This behavior is correct. On the other hand, a couple of DOM attributes throws a TypeError when moved to prototype chains.

This happens only in a very small number of DOM attributes. I cannot find any difference in the binding side between DOM attributes that don't throw and DOM attributes that throw TypeErrors. So I'm suspecting that it might be a bug of V8, but would anyone take a look at it?


--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to