Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(170)

Issue 1121703002: bindings: Uses V8's named property interceptor for Window. (Closed)

Created:
5 years, 7 months ago by Yuki
Modified:
5 years, 3 months ago
CC:
arv+blink, blink-reviews, blink-reviews-bindings_chromium.org, vivekg_samsung, vivekg
Target Ref:
refs/remotes/origin/master
Project:
blink
Visibility:
Public.

Description

bindings: 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. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+86 lines, -103 lines) Patch
M LayoutTests/fast/dom/Window/window-function-frame-getter-precedence.html View 1 2 3 chunks +3 lines, -3 lines 0 comments Download
M LayoutTests/fast/dom/Window/window-function-frame-getter-precedence-expected.txt View 1 2 1 chunk +56 lines, -56 lines 0 comments Download
M LayoutTests/imported/web-platform-tests/html/browsers/the-window-object/window-named-properties-expected.txt View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/core/v8/custom/V8WindowCustom.cpp View 1 2 3 2 chunks +0 lines, -13 lines 0 comments Download
M Source/bindings/templates/interface_base.cpp View 1 2 3 1 chunk +5 lines, -9 lines 0 comments Download
M Source/bindings/tests/results/core/V8TestInterface.cpp View 1 2 3 4 5 1 chunk +4 lines, -4 lines 0 comments Download
M Source/bindings/tests/results/core/V8TestInterface2.cpp View 1 2 3 4 5 1 chunk +3 lines, -3 lines 0 comments Download
M Source/bindings/tests/results/core/V8TestInterface3.cpp View 1 2 3 1 chunk +3 lines, -3 lines 0 comments Download
M Source/bindings/tests/results/core/V8TestObject.cpp View 1 2 3 4 5 1 chunk +3 lines, -3 lines 0 comments Download
M Source/bindings/tests/results/core/V8TestSpecialOperations.cpp View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M Source/bindings/tests/results/core/V8TestSpecialOperationsNotEnumerable.cpp View 1 2 3 1 chunk +3 lines, -3 lines 0 comments Download
M Source/bindings/tests/results/modules/V8TestInterface5.cpp View 1 2 3 4 5 1 chunk +3 lines, -3 lines 0 comments Download

Messages

Total messages: 27 (10 generated)
Yuki
Could you review this CL?
5 years, 7 months ago (2015-05-15 07:35:39 UTC) #2
haraken
cc: Toon + Jochen The security checks are complicated, and I might want to more ...
5 years, 7 months ago (2015-05-15 12:03:40 UTC) #4
Toon Verwaest
I'm not familiar with IDL so I haven't looked at the CL that deeply. Note ...
5 years, 7 months ago (2015-05-15 12:35:02 UTC) #5
jochen (gone - plz use gerrit)
you have to document.body.appendChild(iframe) first I think, no? In any case, I think we shouldn't ...
5 years, 7 months ago (2015-05-15 15:37:16 UTC) #6
Toon Verwaest
Yeah, sorry, I forgot that line. But it doesn't matter: even if you add it ...
5 years, 7 months ago (2015-05-15 16:14:44 UTC) #7
Yuki
Thanks for the review comments, and I'm sorry that I misunderstood FF's behavior. I updated ...
5 years, 7 months ago (2015-05-19 09:46:52 UTC) #8
Yuki
Finally I'm back to this CL. Could you review this CL again?
5 years, 4 months ago (2015-08-25 06:56:03 UTC) #9
haraken
LGTM Add a link of the intent-to-ship to the CL description. https://codereview.chromium.org/1121703002/diff/80001/LayoutTests/imported/web-platform-tests/html/browsers/the-window-object/window-named-properties-expected.txt File LayoutTests/imported/web-platform-tests/html/browsers/the-window-object/window-named-properties-expected.txt (right): ...
5 years, 4 months ago (2015-08-25 07:04:52 UTC) #10
Yuki
https://codereview.chromium.org/1121703002/diff/80001/LayoutTests/imported/web-platform-tests/html/browsers/the-window-object/window-named-properties-expected.txt File LayoutTests/imported/web-platform-tests/html/browsers/the-window-object/window-named-properties-expected.txt (right): https://codereview.chromium.org/1121703002/diff/80001/LayoutTests/imported/web-platform-tests/html/browsers/the-window-object/window-named-properties-expected.txt#newcode4 LayoutTests/imported/web-platform-tests/html/browsers/the-window-object/window-named-properties-expected.txt:4: FAIL constructor assert_equals: expected false but got true On ...
5 years, 4 months ago (2015-08-25 08:03:52 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1121703002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1121703002/80001
5 years, 4 months ago (2015-08-25 08:04:42 UTC) #13
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/103700)
5 years, 4 months ago (2015-08-25 08:58:34 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1121703002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1121703002/80001
5 years, 4 months ago (2015-08-25 09:11:20 UTC) #17
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/103738)
5 years, 4 months ago (2015-08-25 10:29:15 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1121703002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1121703002/100001
5 years, 3 months ago (2015-08-26 07:18:17 UTC) #22
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/98589)
5 years, 3 months ago (2015-08-26 08:29:21 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1121703002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1121703002/100001
5 years, 3 months ago (2015-08-26 12:32:24 UTC) #26
commit-bot: I haz the power
5 years, 3 months ago (2015-08-26 12:37:46 UTC) #27
Message was sent while issue was closed.
Committed patchset #6 (id:100001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=201225

Powered by Google App Engine
This is Rietveld 408576698