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

Issue 203603005: Explicitly mark first 2 args of addEventListener/removeEventListener as optional (Closed)

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

Description

Explicitly mark first 2 args of addEventListener/removeEventListener as optional addEventListener and removeEventListener should require 2 arguments (per spec), but legacy content calls these with 0 or 1 arguments. For background, see this bug: https://code.google.com/p/chromium/issues/detail?id=249598 This results in a special case in the CG, and an IDL that doesn't reflect reality. This updates the IDL to reflect reality, and removes the special-casing from the CG, removing 3 FIXMEs! There's now only 1 EventTarget FIXME in the templates, namely the frame security check (on window). This changes addEventListener.length removeEventListener.length ...from 2 to 0, reflecting reality. R=haraken BUG=345503 BUG=249598 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=169631

Patch Set 1 #

Patch Set 2 : Remove other special case #

Patch Set 3 : Add test, fix crash #

Patch Set 4 : Template cleanup #

Patch Set 5 : More generic #

Patch Set 6 : Update test result (addEventListener.length now 0, not 2) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+88 lines, -55 lines) Patch
M LayoutTests/fast/dom/event-target-arguments.html View 1 2 2 chunks +17 lines, -5 lines 0 comments Download
M LayoutTests/fast/dom/event-target-arguments-expected.txt View 1 2 2 chunks +11 lines, -1 line 0 comments Download
M LayoutTests/fast/js/function-length.html View 1 2 3 4 5 1 chunk +3 lines, -1 line 0 comments Download
M LayoutTests/fast/js/function-length-expected.txt View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/scripts/v8_methods.py View 1 2 3 4 3 chunks +9 lines, -2 lines 0 comments Download
M Source/bindings/templates/interface.cpp View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M Source/bindings/templates/methods.cpp View 1 2 3 4 8 chunks +22 lines, -37 lines 0 comments Download
M Source/bindings/tests/results/V8TestObjectPython.cpp View 1 2 3 4 5 1 chunk +5 lines, -1 line 0 comments Download
M Source/core/core.gypi View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M Source/core/events/EventTarget.h View 1 chunk +7 lines, -0 lines 0 comments Download
M Source/core/events/EventTarget.cpp View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M Source/core/events/EventTarget.idl View 1 2 3 4 1 chunk +6 lines, -4 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
Nils Barth (inactive)
Further clean-up: EventTarget now almost normal!!
6 years, 9 months ago (2014-03-19 03:26:21 UTC) #1
haraken
LGTM. Thanks for the tests.
6 years, 9 months ago (2014-03-19 03:34:19 UTC) #2
Nils Barth (inactive)
On 2014/03/19 03:34:19, haraken wrote: > LGTM. Thanks for the tests. N/p -- adding tests ...
6 years, 9 months ago (2014-03-19 03:35:05 UTC) #3
Nils Barth (inactive)
The CQ bit was checked by nbarth@chromium.org
6 years, 9 months ago (2014-03-20 03:48:03 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/nbarth@chromium.org/203603005/80001
6 years, 9 months ago (2014-03-20 03:48:09 UTC) #5
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-20 04:27:12 UTC) #6
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on mac_blink_rel
6 years, 9 months ago (2014-03-20 04:27:13 UTC) #7
Nils Barth (inactive)
Updated test results (general length test was testing addEventListener), so now returns actual value (0, ...
6 years, 9 months ago (2014-03-20 06:01:06 UTC) #8
Nils Barth (inactive)
The CQ bit was checked by nbarth@chromium.org
6 years, 9 months ago (2014-03-20 06:01:11 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/203603005/100001
6 years, 9 months ago (2014-03-20 06:01:13 UTC) #10
commit-bot: I haz the power
6 years, 9 months ago (2014-03-20 07:09:14 UTC) #11
Message was sent while issue was closed.
Change committed as 169631

Powered by Google App Engine
This is Rietveld 408576698