Index: third_party/WebKit/Source/bindings/templates/methods.cpp |
diff --git a/third_party/WebKit/Source/bindings/templates/methods.cpp b/third_party/WebKit/Source/bindings/templates/methods.cpp |
index 7da229e550055d6fe6ba1edcd669ed0be57fdff7..6edab4054c04c24514ca8b5d333285094f62b6b4 100644 |
--- a/third_party/WebKit/Source/bindings/templates/methods.cpp |
+++ b/third_party/WebKit/Source/bindings/templates/methods.cpp |
@@ -208,7 +208,9 @@ if (!{{argument.name}}{% if argument.is_nullable %} && !isUndefinedOrNull(info[{ |
{# Invalid enum values: http://www.w3.org/TR/WebIDL/#idl-enums #} |
{{declare_enum_validation_variable(argument.enum_values)}} |
if (!isValidEnum({{argument.name}}, validValues, WTF_ARRAY_LENGTH(validValues), "{{argument.enum_type}}", exceptionState)) { |
+ {% if not method.returns_promise %} |
exceptionState.throwIfNeeded(); |
+ {% endif %} |
return; |
} |
{% elif argument.idl_type == 'Promise' %} |