Descriptionbindings: Uses V8's named property interceptor for Window.
Other attributes have already been using V8's named property interceptor.
Window is only an exception. Let's use it for Window, too.
This CL intentionally changes the look-up behavior.
Sample code:
iframe = document.createElement('iframe');
iframe.name = 'alert';
document.body.appendChild(iframe);
Before:
window.alert => iframe with the name 'alert'
After:
window.alert => built-in alert function
According to the spec, (non-named, regular) attributes/methods must have priority over named properties.
See "The named property visibility algorithm" at
http://heycam.github.io/webidl/#indexed-and-named-properties
The order of look-up for non-[OverrideBuiltins] interfaces (including Window) must be:
1. Own properties.
2. Properties from the prototype chain.
3. Named properties.
The Intent-to-Implement-and-Ship is here:
https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/jlmsE3fDCNg
BUG=43394, 516274
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=201225
Patch Set 1 #Patch Set 2 : Synced. #Patch Set 3 : Fixed a layout test. #Patch Set 4 : Synced. #Patch Set 5 : Updated a test result. #
Total comments: 2
Patch Set 6 : Synced. #Messages
Total messages: 27 (10 generated)
|