Index: Source/bindings/templates/methods.cpp |
diff --git a/Source/bindings/templates/methods.cpp b/Source/bindings/templates/methods.cpp |
index 004152c91a53a8c350b818f39a4de2caff1cf93a..d1242e4eee3168de2a0b63efbd15664afa8c4eaf 100644 |
--- a/Source/bindings/templates/methods.cpp |
+++ b/Source/bindings/templates/methods.cpp |
@@ -121,9 +121,11 @@ if (UNLIKELY(info.Length() <= {{argument.index}})) { |
return; |
} |
{% endif %} |
-{% if argument.has_type_checking_interface %} |
+{% 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 #} |
+ 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}} |