| Index: Source/bindings/templates/methods.cpp
|
| diff --git a/Source/bindings/templates/methods.cpp b/Source/bindings/templates/methods.cpp
|
| index 5bb9bfdbd7b6ccd3fc603f0c51b59c47afa2c80d..aee02d93b3009b85d66f003cbb80460e2c2ee44a 100644
|
| --- a/Source/bindings/templates/methods.cpp
|
| +++ b/Source/bindings/templates/methods.cpp
|
| @@ -135,10 +135,10 @@ 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' %}
|
| -{{argument.name}} = V8EventListenerList::getEventListener(ScriptState::current(info.GetIsolate()), info[1], false, ListenerFindOnly);
|
| +{% 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[1], false, ListenerFindOrCreate);
|
| +{{argument.name}} = V8EventListenerList::getEventListener(ScriptState::current(info.GetIsolate()), info[{{argument.index}}], false, ListenerFindOrCreate);
|
| {% endif %}{# method.name #}
|
| {% else %}{# argument.idl_type == 'EventListener' #}
|
| {# Callback functions must be functions:
|
| @@ -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',
|
| + '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 %}
|
|
|
|
|
|
|