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

Issue 204213002: Replace custom EventTarget toNative call with [ToNativeArg] extended attribute

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

Replace custom EventTarget toNative call with [ToNativeArg] extended attribute EventTarget has custom bindings code for the V8 -> C++ conversion. This is just to handle which argument to pass to V8EventListenerList::getEventListener |ListenerFindOrCreate| or |ListenerFindOnly|. This replaces the custom bindings with an extended attribute, [ToNativeArg], which specifies exactly such an argument. This fixes the main remaining ugliness in EventTarget bindings! Documentation: http://www.chromium.org/blink/webidl/blink-idl-extended-attributes#TOC-ToNativeArg-p- Followup to: Simplify EventTarget bindings generation (2) https://codereview.chromium.org/203143002/ R=haraken BUG=345503

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+33 lines, -17 lines) Patch
M Source/bindings/IDLExtendedAttributes.txt View 1 chunk +1 line, -0 lines 0 comments Download
M Source/bindings/scripts/v8_types.py View 2 chunks +4 lines, -5 lines 0 comments Download
M Source/bindings/templates/methods.cpp View 1 chunk +0 lines, -10 lines 0 comments Download
M Source/bindings/tests/idls/TestObjectPython.idl View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/bindings/tests/results/V8TestObjectPython.cpp View 3 chunks +24 lines, -0 lines 2 comments Download
M Source/core/events/EventTarget.idl View 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
Nils Barth (inactive)
Other cleanup.
6 years, 9 months ago (2014-03-19 04:31:14 UTC) #1
haraken
Is [ToNativeArg] going to be used in EventTarget::addEventListener/removeEventListener? If so, I'm not really happy to ...
6 years, 9 months ago (2014-03-19 04:44:17 UTC) #2
Nils Barth (inactive)
Turns out there's a subtler problem: EventListener is a callback interface, but it has static ...
6 years, 9 months ago (2014-03-19 06:12:48 UTC) #3
Nils Barth (inactive)
On 2014/03/19 04:44:17, haraken wrote: > Is [ToNativeArg] going to be used in > EventTarget::addEventListener/removeEventListener? ...
6 years, 9 months ago (2014-03-19 06:16:27 UTC) #4
Nils Barth (inactive)
On 2014/03/19 04:44:17, haraken wrote: > How about generating different methods for addEventListener and > ...
6 years, 9 months ago (2014-03-19 09:33:17 UTC) #5
haraken
6 years, 9 months ago (2014-03-19 09:36:35 UTC) #6
I've not looked at details, but I agree that the current EventListener code is
not well organized. It's worth doing some clean-up.

Powered by Google App Engine
This is Rietveld 408576698