Index: Source/bindings/templates/dictionary_v8.cpp |
diff --git a/Source/bindings/templates/dictionary_v8.cpp b/Source/bindings/templates/dictionary_v8.cpp |
index 77a6b3c6820616bc3cdd2b7bfdd68fdf3753957f..4a18170cb29058d92729815863db2bfd84510c02 100644 |
--- a/Source/bindings/templates/dictionary_v8.cpp |
+++ b/Source/bindings/templates/dictionary_v8.cpp |
@@ -19,6 +19,9 @@ namespace blink { |
// FIXME: Do not use Dictionary and DictionaryHelper |
// https://crbug.com/321462 |
Dictionary dictionary(v8Value, isolate); |
+ // FIXME: Remove this v8::TryCatch once the code is switched from |
+ // Dictionary/DictionaryHelper to something that uses ExceptionState. |
+ v8::TryCatch block; |
{% for member in members %} |
{{member.cpp_type}} {{member.name}}; |
if (DictionaryHelper::getWithUndefinedOrNullCheck(dictionary, "{{member.name}}", {{member.name}})) { |
@@ -30,6 +33,9 @@ namespace blink { |
} |
{% endif %} |
impl->{{member.setter_name}}({{member.name}}); |
+ } else if (block.HasCaught()) { |
+ exceptionState.rethrowV8Exception(block.Exception()); |
+ return 0; |
} |
{% endfor %} |
return impl; |