Index: Source/bindings/scripts/v8_types.py |
diff --git a/Source/bindings/scripts/v8_types.py b/Source/bindings/scripts/v8_types.py |
index 6c2351c32ce23b20fdbf4740546d895c091e183f..6069280c4a5db2698c0108303d6e237dd5eca90f 100644 |
--- a/Source/bindings/scripts/v8_types.py |
+++ b/Source/bindings/scripts/v8_types.py |
@@ -336,10 +336,7 @@ V8_VALUE_TO_CPP_VALUE = { |
# Interface types |
'CompareHow': 'static_cast<Range::CompareHow>({v8_value}->Int32Value())', |
'Dictionary': 'Dictionary({v8_value}, info.GetIsolate())', |
- # FIXME: EventListener is special-cased in templates instead, because |
- # removeEventListener uses ListenerFindOnly (only use) instead of |
- # ListenerFindOrCreate. |
- # 'EventListener': 'V8EventListenerList::getEventListener({v8_value}, false, ListenerFindOrCreate/ListenerFindOnly)' |
+ 'EventListener': 'V8EventListenerList::getEventListener({v8_value}, false, {arguments})', |
'EventTarget': 'V8DOMWrapper::isDOMWrapper({v8_value}) ? toWrapperTypeInfo(v8::Handle<v8::Object>::Cast({v8_value}))->toEventTarget(v8::Handle<v8::Object>::Cast({v8_value})) : 0', |
'MediaQueryListListener': 'MediaQueryListListener::create(ScriptValue({v8_value}, info.GetIsolate()))', |
'NodeFilter': 'toNodeFilter({v8_value}, info.GetIsolate())', |
@@ -362,7 +359,9 @@ def v8_value_to_cpp_value(idl_type, extended_attributes, v8_value, index): |
add_includes_for_type(idl_type) |
base_idl_type = idl_type.base_type |
- if 'EnforceRange' in extended_attributes: |
+ if 'ToNativeArg' in extended_attributes: |
+ arguments = extended_attributes['ToNativeArg'] |
+ elif 'EnforceRange' in extended_attributes: |
arguments = ', '.join([v8_value, 'EnforceRange', 'exceptionState']) |
elif idl_type.is_integer_type: # NormalConversion |
arguments = ', '.join([v8_value, 'exceptionState']) |