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

Side by Side Diff: third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceEventInit.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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file has been auto-generated by code_generator_v8.py. 5 // This file has been auto-generated by code_generator_v8.py.
6 // DO NOT MODIFY! 6 // DO NOT MODIFY!
7 7
8 // This file has been generated from the Jinja2 template in 8 // This file has been generated from the Jinja2 template in
9 // third_party/WebKit/Source/bindings/templates/dictionary_v8.cpp.tmpl 9 // third_party/WebKit/Source/bindings/templates/dictionary_v8.cpp.tmpl
10 10
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 v8::Local<v8::Object> v8Object = v8::Object::New(isolate); 53 v8::Local<v8::Object> v8Object = v8::Object::New(isolate);
54 if (!toV8TestInterfaceEventInit(*this, v8Object, creationContext, isolate)) 54 if (!toV8TestInterfaceEventInit(*this, v8Object, creationContext, isolate))
55 return v8::Undefined(isolate); 55 return v8::Undefined(isolate);
56 return v8Object; 56 return v8Object;
57 } 57 }
58 58
59 bool toV8TestInterfaceEventInit(const TestInterfaceEventInit& impl, v8::Local<v8 ::Object> dictionary, v8::Local<v8::Object> creationContext, v8::Isolate* isolat e) { 59 bool toV8TestInterfaceEventInit(const TestInterfaceEventInit& impl, v8::Local<v8 ::Object> dictionary, v8::Local<v8::Object> creationContext, v8::Isolate* isolat e) {
60 if (!toV8EventInit(impl, dictionary, creationContext, isolate)) 60 if (!toV8EventInit(impl, dictionary, creationContext, isolate))
61 return false; 61 return false;
62 62
63 v8::Local<v8::Value> stringMemberValue;
64 bool stringMemberHasValueOrDefault = false;
63 if (impl.hasStringMember()) { 65 if (impl.hasStringMember()) {
64 if (!v8CallBoolean(dictionary->CreateDataProperty(isolate->GetCurrentContext (), v8AtomicString(isolate, "stringMember"), v8String(isolate, impl.stringMember ())))) 66 stringMemberValue = v8String(isolate, impl.stringMember());
65 return false; 67 stringMemberHasValueOrDefault = true;
68 }
69 if (stringMemberHasValueOrDefault &&
70 !v8CallBoolean(dictionary->CreateDataProperty(isolate->GetCurrentContext() , v8AtomicString(isolate, "stringMember"), stringMemberValue))) {
71 return false;
66 } 72 }
67 73
68 return true; 74 return true;
69 } 75 }
70 76
71 TestInterfaceEventInit NativeValueTraits<TestInterfaceEventInit>::nativeValue(v8 ::Isolate* isolate, v8::Local<v8::Value> value, ExceptionState& exceptionState) { 77 TestInterfaceEventInit NativeValueTraits<TestInterfaceEventInit>::nativeValue(v8 ::Isolate* isolate, v8::Local<v8::Value> value, ExceptionState& exceptionState) {
72 TestInterfaceEventInit impl; 78 TestInterfaceEventInit impl;
73 V8TestInterfaceEventInit::toImpl(isolate, value, impl, exceptionState); 79 V8TestInterfaceEventInit::toImpl(isolate, value, impl, exceptionState);
74 return impl; 80 return impl;
75 } 81 }
76 82
77 } // namespace blink 83 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698