Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1646)

Unified Diff: third_party/WebKit/Source/bindings/tests/results/core/V8TestPermissiveDictionary.cpp

Issue 2029423002: Clean up V8 bindings template code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2743
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/bindings/tests/results/core/V8TestPermissiveDictionary.cpp
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestPermissiveDictionary.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestPermissiveDictionary.cpp
index 45e8fe1e6e0a6b84e66e8fe1441dea23e39eb3be..acc0b08e45e047833de39a0b8729098cdac464cb 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestPermissiveDictionary.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestPermissiveDictionary.cpp
@@ -26,20 +26,18 @@ void V8TestPermissiveDictionary::toImpl(v8::Isolate* isolate, v8::Local<v8::Valu
exceptionState.rethrowV8Exception(block.Exception());
return;
}
- {
- v8::Local<v8::Value> booleanMemberValue;
- if (!v8Object->Get(isolate->GetCurrentContext(), v8String(isolate, "booleanMember")).ToLocal(&booleanMemberValue)) {
- exceptionState.rethrowV8Exception(block.Exception());
+ v8::Local<v8::Value> booleanMemberValue;
+ if (!v8Object->Get(isolate->GetCurrentContext(), v8String(isolate, "booleanMember")).ToLocal(&booleanMemberValue)) {
+ exceptionState.rethrowV8Exception(block.Exception());
+ return;
+ }
+ if (booleanMemberValue.IsEmpty() || booleanMemberValue->IsUndefined()) {
+ // Do nothing.
+ } else {
+ bool booleanMember = toBoolean(isolate, booleanMemberValue, exceptionState);
+ if (exceptionState.hadException())
return;
- }
- if (booleanMemberValue.IsEmpty() || booleanMemberValue->IsUndefined()) {
- // Do nothing.
- } else {
- bool booleanMember = toBoolean(isolate, booleanMemberValue, exceptionState);
- if (exceptionState.hadException())
- return;
- impl.setBooleanMember(booleanMember);
- }
+ impl.setBooleanMember(booleanMember);
}
}

Powered by Google App Engine
This is Rietveld 408576698