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

Issue 201603002: Simplify EventTarget bindings generation (Closed)

Created:
6 years, 9 months ago by Nils Barth (inactive)
Modified:
6 years, 9 months ago
Reviewers:
haraken
CC:
blink-reviews, Nils Barth (inactive), kojih, arv+blink, jsbell+bindings_chromium.org, sof, kouhei+bindings_chromium.org, abarth-chromium, marja+watch_chromium.org, adamk+blink_chromium.org, haraken, Nate Chapin, Inactive
Visibility:
Public.

Description

Simplify EventTarget bindings generation EventTarget has special-cased bindings generation, with several bugs. This CL corrects and simplifies it in a few ways: 1. Remove duplicate |EventTarget* imp| initialization Currently EventListener has |EventTarget* imp| initialized twice. (With different names, |impl| and |imp|, so this compiles.) Also rearranges the template code so that the special case is more narrowly focused (instead of overall), and check the interface name, not just method names, which clarifies the special case. (This also means we can remove the test cases, as it's just a special-case for one interface.) This does *not* change web behavior: Unlike all other methods, addEventListener and removeEventListener do not check arguments length. This is apparently required for legacy calls, so I've opened a separate bug for this: https://code.google.com/p/chromium/issues/detail?id=353484 Previously EventTarget skipped this, due to having an overall special case, instead of just special-casing the method call itself; we now have an explicit special-case in the template. This was hit by 3 tests: fast/dom/node-legacy-event-listener.html fast/dom/XMLHttpRequest-legacy-event-listener.html fast/dom/Window/window-legacy-event-listener.html (More details at the bug.) I've added more detailed tests on behavior, and other argument handling. Follow-up CL: * further reduce special case (use usual argument handling) TBR=haraken BUG=345503 BUG=353484 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=169506

Patch Set 1 #

Patch Set 2 : Cleaner #

Patch Set 3 : Much more extensive #

Total comments: 6

Patch Set 4 : Don't change web behavior #

Unified diffs Side-by-side diffs Delta from patch set Stats (+110 lines, -184 lines) Patch
A LayoutTests/fast/dom/event-target-arguments.html View 1 2 3 1 chunk +59 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/event-target-arguments-expected.txt View 1 2 3 1 chunk +34 lines, -0 lines 0 comments Download
M Source/bindings/templates/methods.cpp View 1 2 3 5 chunks +17 lines, -16 lines 0 comments Download
M Source/bindings/tests/idls/TestObject.idl View 1 2 1 chunk +0 lines, -7 lines 0 comments Download
M Source/bindings/tests/idls/TestObjectPython.idl View 1 2 1 chunk +0 lines, -9 lines 0 comments Download
M Source/bindings/tests/results/V8TestObject.cpp View 1 2 3 chunks +0 lines, -59 lines 0 comments Download
M Source/bindings/tests/results/V8TestObjectPython.cpp View 1 2 4 chunks +0 lines, -93 lines 0 comments Download

Messages

Total messages: 27 (0 generated)
Nils Barth (inactive)
Simplification and correction for our least favorite special case (EventTarget). https://codereview.chromium.org/201603002/diff/40001/Source/bindings/templates/methods.cpp File Source/bindings/templates/methods.cpp (left): https://codereview.chromium.org/201603002/diff/40001/Source/bindings/templates/methods.cpp#oldcode9 ...
6 years, 9 months ago (2014-03-18 03:34:46 UTC) #1
Nils Barth (inactive)
For reference, here's the exact change in output. The content is simply: * Always check ...
6 years, 9 months ago (2014-03-18 03:36:14 UTC) #2
haraken
LGTM https://codereview.chromium.org/201603002/diff/40001/Source/bindings/templates/methods.cpp File Source/bindings/templates/methods.cpp (right): https://codereview.chromium.org/201603002/diff/40001/Source/bindings/templates/methods.cpp#newcode60 Source/bindings/templates/methods.cpp:60: {# FIXME: use the existing shouldAllowAccessToFrame check if ...
6 years, 9 months ago (2014-03-18 03:43:57 UTC) #3
Nils Barth (inactive)
https://codereview.chromium.org/201603002/diff/40001/Source/bindings/templates/methods.cpp File Source/bindings/templates/methods.cpp (right): https://codereview.chromium.org/201603002/diff/40001/Source/bindings/templates/methods.cpp#newcode60 Source/bindings/templates/methods.cpp:60: {# FIXME: use the existing shouldAllowAccessToFrame check if possible. ...
6 years, 9 months ago (2014-03-18 04:47:03 UTC) #4
Nils Barth (inactive)
The CQ bit was checked by nbarth@chromium.org
6 years, 9 months ago (2014-03-18 04:47:08 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/nbarth@chromium.org/201603002/40001
6 years, 9 months ago (2014-03-18 04:47:15 UTC) #6
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-18 04:48:35 UTC) #7
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on mac_blink_compile_dbg
6 years, 9 months ago (2014-03-18 04:48:36 UTC) #8
Nils Barth (inactive)
The CQ bit was checked by nbarth@chromium.org
6 years, 9 months ago (2014-03-18 05:04:58 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/nbarth@chromium.org/201603002/40001
6 years, 9 months ago (2014-03-18 05:05:05 UTC) #10
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-18 05:16:34 UTC) #11
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on linux_blink_rel
6 years, 9 months ago (2014-03-18 05:16:35 UTC) #12
Nils Barth (inactive)
The CQ bit was checked by nbarth@chromium.org
6 years, 9 months ago (2014-03-18 06:07:43 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/nbarth@chromium.org/201603002/40001
6 years, 9 months ago (2014-03-18 06:07:45 UTC) #14
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-18 06:10:42 UTC) #15
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on win_blink_rel
6 years, 9 months ago (2014-03-18 06:10:43 UTC) #16
Nils Barth (inactive)
The CQ bit was checked by nbarth@chromium.org
6 years, 9 months ago (2014-03-18 06:23:32 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/nbarth@chromium.org/201603002/40001
6 years, 9 months ago (2014-03-18 06:23:38 UTC) #18
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-18 06:39:47 UTC) #19
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on linux_blink_rel
6 years, 9 months ago (2014-03-18 06:39:47 UTC) #20
Nils Barth (inactive)
The CQ bit was checked by nbarth@chromium.org
6 years, 9 months ago (2014-03-18 09:12:52 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/nbarth@chromium.org/201603002/60001
6 years, 9 months ago (2014-03-18 09:12:58 UTC) #22
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-18 10:02:16 UTC) #23
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on win_blink_rel
6 years, 9 months ago (2014-03-18 10:02:17 UTC) #24
Nils Barth (inactive)
The CQ bit was checked by nbarth@chromium.org
6 years, 9 months ago (2014-03-19 01:09:00 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/nbarth@chromium.org/201603002/60001
6 years, 9 months ago (2014-03-19 01:09:07 UTC) #26
commit-bot: I haz the power
6 years, 9 months ago (2014-03-19 02:44:30 UTC) #27
Message was sent while issue was closed.
Change committed as 169506

Powered by Google App Engine
This is Rietveld 408576698