Chromium Code Reviews| Index: Source/bindings/templates/union.cpp |
| diff --git a/Source/bindings/templates/union.cpp b/Source/bindings/templates/union.cpp |
| index 48a358656dc018a3c3efe008af256ac2cb460422..3c9fbd493870146dd4c5802f219655c46033ed48 100644 |
| --- a/Source/bindings/templates/union.cpp |
| +++ b/Source/bindings/templates/union.cpp |
| @@ -80,9 +80,11 @@ void V8{{container.cpp_class}}::toImpl(v8::Isolate* isolate, v8::Handle<v8::Valu |
| {# FIXME: This should also check "object but not Date or RegExp". Add checks |
| when we implement conversions for Date and RegExp. #} |
| if (isUndefinedOrNull(v8Value) || v8Value->IsObject()) { |
| - {{container.dictionary_type.cpp_local_type}} cppValue = V8{{container.dictionary_type.type_name}}::toImpl(isolate, v8Value, exceptionState); |
|
bashi
2014/11/12 05:13:07
This was wrong. Union type containers' toImpl() do
|
| - if (!exceptionState.hadException()) |
| - impl.set{{container.dictionary_type.type_name}}(cppValue); |
| + {% if container.dictionary_type.type_name != 'Dictionary' %} |
| + {{container.dictionary_type.cpp_local_type}} cppValue; |
| + {% endif %} |
| + {{container.dictionary_type.v8_value_to_local_cpp_value}}; |
| + impl.set{{container.dictionary_type.type_name}}(cppValue); |
| return; |
| } |