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

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

Issue 2755323002: [Bindings] Emit less code per member in generated dictionary ToV8. (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceEventInit.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 4d395e5b85baff576b0e94849ec57a2bb627f76b..e863895d63c26dca81d45e1bfb6ff329aac692cf 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestPermissiveDictionary.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestPermissiveDictionary.cpp
@@ -52,9 +52,15 @@ v8::Local<v8::Value> TestPermissiveDictionary::toV8Impl(v8::Local<v8::Object> cr
}
bool toV8TestPermissiveDictionary(const TestPermissiveDictionary& impl, v8::Local<v8::Object> dictionary, v8::Local<v8::Object> creationContext, v8::Isolate* isolate) {
+ v8::Local<v8::Value> booleanMemberValue;
+ bool booleanMemberHasValueOrDefault = false;
if (impl.hasBooleanMember()) {
- if (!v8CallBoolean(dictionary->CreateDataProperty(isolate->GetCurrentContext(), v8AtomicString(isolate, "booleanMember"), v8Boolean(impl.booleanMember(), isolate))))
- return false;
+ booleanMemberValue = v8Boolean(impl.booleanMember(), isolate);
+ booleanMemberHasValueOrDefault = true;
+ }
+ if (booleanMemberHasValueOrDefault &&
+ !v8CallBoolean(dictionary->CreateDataProperty(isolate->GetCurrentContext(), v8AtomicString(isolate, "booleanMember"), booleanMemberValue))) {
+ return false;
}
return true;
« no previous file with comments | « third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceEventInit.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698