Index: Source/bindings/templates/dictionary_v8.cpp |
diff --git a/Source/bindings/templates/dictionary_v8.cpp b/Source/bindings/templates/dictionary_v8.cpp |
index c2e6ef1b96f7e498460f080a608721fb1d1aa5be..6502ef65556ebdf92b93f6bf2768884e6a8a240e 100644 |
--- a/Source/bindings/templates/dictionary_v8.cpp |
+++ b/Source/bindings/templates/dictionary_v8.cpp |
@@ -20,7 +20,11 @@ void {{v8_class}}::toImpl(v8::Isolate* isolate, v8::Handle<v8::Value> v8Value, { |
if (isUndefinedOrNull(v8Value)) |
return; |
if (!v8Value->IsObject()) { |
+ {% if use_permissive_dictionary_conversion %} |
+ // Do nothing. |
+ {% else %} |
exceptionState.throwTypeError("cannot convert to dictionary."); |
+ {% endif %} |
return; |
} |