| Index: Source/bindings/templates/methods.cpp
|
| diff --git a/Source/bindings/templates/methods.cpp b/Source/bindings/templates/methods.cpp
|
| index 598506269c938201bd0d63a2271c22b8b373d6da..c3dc21682a703dc997a46897f673aa76e5e3f4e8 100644
|
| --- a/Source/bindings/templates/methods.cpp
|
| +++ b/Source/bindings/templates/methods.cpp
|
| @@ -21,7 +21,7 @@ static void {{method.name}}{{method.overload_index}}Method{{world_suffix}}(const
|
| CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
|
| {% endif %}
|
| {# Security checks #}
|
| - {# FIXME: change to method.is_check_security_for_window #}
|
| + {# FIXME: merge to method.is_check_security_for_frame http://crbug.com/383699 #}
|
| {% if interface_name == 'EventTarget' %}
|
| if (LocalDOMWindow* window = impl->toDOMWindow()) {
|
| if (!BindingSecurity::shouldAllowAccessToFrame(info.GetIsolate(), window->frame(), exceptionState)) {
|
| @@ -258,13 +258,14 @@ if (exceptionState.hadException()) {
|
| {{v8_set_return_value}};
|
| {%- endif %}{# None for void #}
|
| {# Post-set #}
|
| -{% if interface_name == 'EventTarget' and method.name in ('addEventListener',
|
| - 'removeEventListener') %}
|
| +{# Arguments length check needed to skip action on legacy calls without enough
|
| + arguments. http://crbug.com/353484 #}
|
| +{% if interface_name == 'EventTarget' and
|
| + method.name in ('addEventListener', 'removeEventListener') and
|
| + method.arguments|length >= 2 %}
|
| {% set hidden_dependency_action = 'addHiddenValueToArray'
|
| if method.name == 'addEventListener' else 'removeHiddenValueFromArray' %}
|
| -{# Length check needed to skip action on legacy calls without enough arguments.
|
| - http://crbug.com/353484 #}
|
| -if (info.Length() >= 2 && listener && !impl->toNode())
|
| +if (listener && !impl->toNode())
|
| {{hidden_dependency_action}}(info.Holder(), info[1], {{v8_class}}::eventListenerCacheIndex, info.GetIsolate());
|
| {% endif %}
|
| {% endmacro %}
|
|
|