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

Issue 1233483002: Add counters for add/removeEventListener() called with one argument (Closed)

Created:
5 years, 5 months ago by philipj_slow
Modified:
5 years, 5 months ago
Reviewers:
haraken
CC:
blink-reviews, blink-reviews-bindings_chromium.org, vivekg_samsung, arv+blink, vivekg
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Add counters for add/removeEventListener() called with one argument This was attempted previously but only worked for no arguments: https://codereview.chromium.org/815503002 https://codereview.chromium.org/928103002 The enum values are added in their original positions in UseCounter.h, as they were always unreachable and thus not polluted by anything else. The reason was that there is no generated impl-> call with one argument, as EventListener has special handling in the bindings generator such that it's effectively treated as having a default null argument. Give all the arguments default values in the IDL so that there is only one impl-> call in the generated code, with the prologue and epilogue immediately before and after it. This makes it more clear that the prologue will always be called, and makes this purely a bindings bug. The removed FIXMEs in EventTarget.cpp were wrong, it should be possible to pass null for the listener argument and per spec that should do nothing. Rather than extending support for [Conditional] here, remove it for [Custom=CallEpilogue] as it's actually never used there, nor tested. BUG=353484 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=198681

Patch Set 1 #

Total comments: 2

Patch Set 2 : Count in CallPrologue instead #

Total comments: 6

Patch Set 3 : No [Conditional] support #

Unified diffs Side-by-side diffs Delta from patch set Stats (+71 lines, -30 lines) Patch
M LayoutTests/fast/dom/event-target-arguments.html View 1 2 chunks +12 lines, -0 lines 0 comments Download
M LayoutTests/fast/dom/event-target-arguments-expected.txt View 1 2 chunks +8 lines, -0 lines 0 comments Download
M Source/bindings/IDLExtendedAttributes.txt View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/core/v8/custom/V8EventTargetCustom.cpp View 1 1 chunk +17 lines, -0 lines 0 comments Download
M Source/bindings/scripts/v8_methods.py View 1 2 chunks +4 lines, -1 line 0 comments Download
M Source/bindings/templates/interface.h View 1 2 1 chunk +3 lines, -2 lines 0 comments Download
M Source/bindings/templates/methods.cpp View 1 1 chunk +3 lines, -0 lines 0 comments Download
M Source/bindings/tests/idls/core/TestObject.idl View 1 1 chunk +1 line, -0 lines 0 comments Download
M Source/bindings/tests/results/core/V8TestObject.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M Source/bindings/tests/results/core/V8TestObject.cpp View 1 2 chunks +15 lines, -0 lines 0 comments Download
M Source/core/events/EventTarget.h View 1 chunk +2 lines, -7 lines 0 comments Download
M Source/core/events/EventTarget.cpp View 2 chunks +0 lines, -16 lines 0 comments Download
M Source/core/events/EventTarget.idl View 1 1 chunk +2 lines, -3 lines 0 comments Download
M Source/core/frame/UseCounter.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 22 (6 generated)
philipj_slow
PTAL Depends on https://codereview.chromium.org/1227823009/
5 years, 5 months ago (2015-07-09 22:08:57 UTC) #2
haraken
https://codereview.chromium.org/1233483002/diff/1/Source/core/frame/UseCounter.h File Source/core/frame/UseCounter.h (right): https://codereview.chromium.org/1233483002/diff/1/Source/core/frame/UseCounter.h#newcode563 Source/core/frame/UseCounter.h:563: AddEventListenerOneArgument = 657, I'm wondering why the entry 657 ...
5 years, 5 months ago (2015-07-09 23:37:59 UTC) #3
philipj_slow
https://codereview.chromium.org/1233483002/diff/1/Source/core/frame/UseCounter.h File Source/core/frame/UseCounter.h (right): https://codereview.chromium.org/1233483002/diff/1/Source/core/frame/UseCounter.h#newcode563 Source/core/frame/UseCounter.h:563: AddEventListenerOneArgument = 657, On 2015/07/09 23:37:58, haraken wrote: > ...
5 years, 5 months ago (2015-07-10 07:46:47 UTC) #4
haraken
On 2015/07/10 07:46:47, philipj wrote: > https://codereview.chromium.org/1233483002/diff/1/Source/core/frame/UseCounter.h > File Source/core/frame/UseCounter.h (right): > > https://codereview.chromium.org/1233483002/diff/1/Source/core/frame/UseCounter.h#newcode563 > ...
5 years, 5 months ago (2015-07-10 07:48:37 UTC) #5
philipj_slow
Count in CallPrologue instead
5 years, 5 months ago (2015-07-10 07:55:28 UTC) #6
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1233483002/20001
5 years, 5 months ago (2015-07-10 07:55:50 UTC) #9
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 5 months ago (2015-07-10 09:18:20 UTC) #11
philipj_slow
haraken-san, can you take another look? Your previous LGTM was before the CallPrologue rewrite.
5 years, 5 months ago (2015-07-10 09:26:09 UTC) #12
haraken
On 2015/07/10 09:26:09, philipj wrote: > haraken-san, can you take another look? Your previous LGTM ...
5 years, 5 months ago (2015-07-10 09:27:20 UTC) #13
haraken
LGTM https://codereview.chromium.org/1233483002/diff/20001/Source/bindings/core/v8/custom/V8EventTargetCustom.cpp File Source/bindings/core/v8/custom/V8EventTargetCustom.cpp (right): https://codereview.chromium.org/1233483002/diff/20001/Source/bindings/core/v8/custom/V8EventTargetCustom.cpp#newcode43 Source/bindings/core/v8/custom/V8EventTargetCustom.cpp:43: info.Length() == 0 ? UseCounter::AddEventListenerNoArguments : UseCounter::AddEventListenerOneArgument); You ...
5 years, 5 months ago (2015-07-10 09:32:21 UTC) #14
philipj_slow
https://codereview.chromium.org/1233483002/diff/20001/Source/bindings/core/v8/custom/V8EventTargetCustom.cpp File Source/bindings/core/v8/custom/V8EventTargetCustom.cpp (right): https://codereview.chromium.org/1233483002/diff/20001/Source/bindings/core/v8/custom/V8EventTargetCustom.cpp#newcode43 Source/bindings/core/v8/custom/V8EventTargetCustom.cpp:43: info.Length() == 0 ? UseCounter::AddEventListenerNoArguments : UseCounter::AddEventListenerOneArgument); On 2015/07/10 ...
5 years, 5 months ago (2015-07-10 09:41:27 UTC) #15
haraken
https://codereview.chromium.org/1233483002/diff/20001/Source/bindings/templates/interface.h File Source/bindings/templates/interface.h (right): https://codereview.chromium.org/1233483002/diff/20001/Source/bindings/templates/interface.h#newcode86 Source/bindings/templates/interface.h:86: {% filter conditional(method.conditional_string) %} On 2015/07/10 09:41:27, philipj wrote: ...
5 years, 5 months ago (2015-07-10 09:50:52 UTC) #16
philipj_slow
No [Conditional] support
5 years, 5 months ago (2015-07-10 11:10:02 UTC) #17
philipj_slow
https://codereview.chromium.org/1233483002/diff/20001/Source/bindings/templates/interface.h File Source/bindings/templates/interface.h (right): https://codereview.chromium.org/1233483002/diff/20001/Source/bindings/templates/interface.h#newcode86 Source/bindings/templates/interface.h:86: {% filter conditional(method.conditional_string) %} On 2015/07/10 09:50:52, haraken wrote: ...
5 years, 5 months ago (2015-07-10 11:10:57 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1233483002/40001
5 years, 5 months ago (2015-07-10 11:11:13 UTC) #21
commit-bot: I haz the power
5 years, 5 months ago (2015-07-10 12:05:01 UTC) #22
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=198681

Powered by Google App Engine
This is Rietveld 408576698