Chromium Code Reviews| Index: Source/bindings/templates/methods.cpp |
| diff --git a/Source/bindings/templates/methods.cpp b/Source/bindings/templates/methods.cpp |
| index 4410a719c556bded82ba377ea8f4ed57920062ee..aee02d93b3009b85d66f003cbb80460e2c2ee44a 100644 |
| --- a/Source/bindings/templates/methods.cpp |
| +++ b/Source/bindings/templates/methods.cpp |
| @@ -135,7 +135,7 @@ if (info.Length() > {{argument.index}} && {% if argument.is_nullable %}!isUndefi |
| {% if argument.is_callback_interface %} |
| {# FIXME: remove EventListener special case #} |
| {% if argument.idl_type == 'EventListener' %} |
| -{% if method.name == 'removeEventListener' %} |
| +{% if method.name == 'removeEventListener' or method.name == 'removeListener' %} |
| {{argument.name}} = V8EventListenerList::getEventListener(ScriptState::current(info.GetIsolate()), info[{{argument.index}}], false, ListenerFindOnly); |
| {% else %}{# method.name == 'addEventListener' #} |
| {{argument.name}} = V8EventListenerList::getEventListener(ScriptState::current(info.GetIsolate()), info[{{argument.index}}], false, ListenerFindOrCreate); |
| @@ -287,6 +287,13 @@ else |
| if (info.Length() >= 2 && listener && !impl->toNode()) |
| {{hidden_dependency_action}}(info.Holder(), info[1], {{v8_class}}::eventListenerCacheIndex, info.GetIsolate()); |
| {% endif %} |
| +{% if interface_name == 'MediaQueryList' and method.name in ('addListener', |
|
haraken
2014/07/20 05:14:49
Why does the MediaQueryList need separate code fro
cbiesinger
2014/07/21 22:07:19
Done.
|
| + 'removeListener') %} |
| +{% set hidden_dependency_action = 'addHiddenValueToArray' |
| + if method.name == 'addListener' else 'removeHiddenValueFromArray' %} |
| +if (listener) |
| + {{hidden_dependency_action}}(info.Holder(), info[0], {{v8_class}}::eventListenerCacheIndex, info.GetIsolate()); |
| +{% endif %} |
| {% endmacro %} |