Chromium Code Reviews| Index: Source/bindings/tests/results/core/V8TestDictionary.cpp |
| diff --git a/Source/bindings/tests/results/core/V8TestDictionary.cpp b/Source/bindings/tests/results/core/V8TestDictionary.cpp |
| index b66fc3163d1c8f05051b0fb52f71768ca3287746..6c94a96bcd97898f2239169361ca6f2e2901ab8a 100644 |
| --- a/Source/bindings/tests/results/core/V8TestDictionary.cpp |
| +++ b/Source/bindings/tests/results/core/V8TestDictionary.cpp |
| @@ -45,7 +45,9 @@ void V8TestDictionary::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value |
| if (booleanMemberValue.IsEmpty() || booleanMemberValue->IsUndefined()) { |
| // Do nothing. |
| } else { |
| - bool booleanMember = booleanMemberValue->BooleanValue(); |
| + bool booleanMember = toBoolean(isolate, booleanMemberValue, exceptionState); |
|
Yuki
2015/04/10 06:17:29
This code looks to me a lesser version of Maybe.
bashi
2015/04/10 06:39:54
It will require substantial changes in the code ge
Yuki
2015/04/10 07:01:43
Thanks for the explanation. Reinvention of except
|
| + if (exceptionState.hadException()) |
| + return; |
| impl.setBooleanMember(booleanMember); |
| } |
| @@ -57,7 +59,9 @@ void V8TestDictionary::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value |
| if (createValue.IsEmpty() || createValue->IsUndefined()) { |
| // Do nothing. |
| } else { |
| - bool create = createValue->BooleanValue(); |
| + bool create = toBoolean(isolate, createValue, exceptionState); |
| + if (exceptionState.hadException()) |
| + return; |
| impl.setCreateMember(create); |
| } |
| @@ -70,7 +74,9 @@ void V8TestDictionary::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value |
| // Do nothing. |
| } else { |
| UseCounter::countDeprecationIfNotPrivateScript(isolate, callingExecutionContext(isolate), UseCounter::CreateMember); |
| - bool deprecatedCreateMember = deprecatedCreateMemberValue->BooleanValue(); |
| + bool deprecatedCreateMember = toBoolean(isolate, deprecatedCreateMemberValue, exceptionState); |
| + if (exceptionState.hadException()) |
| + return; |
| impl.setCreateMember(deprecatedCreateMember); |
| } |