| Index: Source/bindings/templates/methods.cpp
|
| diff --git a/Source/bindings/templates/methods.cpp b/Source/bindings/templates/methods.cpp
|
| index 3403080dc766585bc54ddbc65b7324b1a50fa160..de06d08418e1541beb685ada9123514d1064175f 100644
|
| --- a/Source/bindings/templates/methods.cpp
|
| +++ b/Source/bindings/templates/methods.cpp
|
| @@ -109,17 +109,6 @@ if (UNLIKELY(info.Length() <= {{argument.index}})) {
|
| return;
|
| }
|
| {% endif %}
|
| -{% if argument.has_type_checking_interface and not argument.is_variadic_wrapper_type %}
|
| -{# Type checking for wrapper interface types (if interface not implemented,
|
| - throw a TypeError), per http://www.w3.org/TR/WebIDL/#es-interface
|
| - Note: for variadic arguments, the type checking is done for each matched
|
| - argument instead; see argument.is_variadic_wrapper_type code-path below. #}
|
| -if (info.Length() > {{argument.index}} && {% if argument.is_nullable %}!isUndefinedOrNull(info[{{argument.index}}]) && {% endif %}!V8{{argument.idl_type}}::hasInstance(info[{{argument.index}}], info.GetIsolate())) {
|
| - {{throw_type_error(method, '"parameter %s is not of type \'%s\'."' %
|
| - (argument.index + 1, argument.idl_type)) | indent}}
|
| - return;
|
| -}
|
| -{% endif %}{# argument.has_type_checking_interface #}
|
| {% if argument.is_callback_interface %}
|
| {# FIXME: remove EventListener special case #}
|
| {% if argument.idl_type == 'EventListener' %}
|
| @@ -187,6 +176,16 @@ if (!std::isfinite({{argument.name}})) {
|
| (argument.idl_type, argument.index + 1)) | indent}}
|
| return;
|
| }
|
| +{% elif argument.has_type_checking_interface and not argument.is_variadic_wrapper_type %}
|
| +{# Type checking for wrapper interface types (if interface not implemented,
|
| + throw a TypeError), per http://www.w3.org/TR/WebIDL/#es-interface
|
| + Note: for variadic arguments, the type checking is done for each matched
|
| + argument instead; see argument.is_variadic_wrapper_type code-path above. #}
|
| +if (!{{argument.name}}{% if argument.is_nullable %} && !isUndefinedOrNull(info[{{argument.index}}]){% endif %}) {
|
| + {{throw_type_error(method, '"parameter %s is not of type \'%s\'."' %
|
| + (argument.index + 1, argument.idl_type)) | indent}}
|
| + return;
|
| +}
|
| {% elif argument.enum_validation_expression %}
|
| {# Invalid enum values: http://www.w3.org/TR/WebIDL/#idl-enums #}
|
| String string = {{argument.name}};
|
|
|