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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 } 45 }
46 46
47 v8::Local<v8::Value> TestPermissiveDictionary::toV8Impl(v8::Local<v8::Object> cr eationContext, v8::Isolate* isolate) const { 47 v8::Local<v8::Value> TestPermissiveDictionary::toV8Impl(v8::Local<v8::Object> cr eationContext, v8::Isolate* isolate) const {
48 v8::Local<v8::Object> v8Object = v8::Object::New(isolate); 48 v8::Local<v8::Object> v8Object = v8::Object::New(isolate);
49 if (!toV8TestPermissiveDictionary(*this, v8Object, creationContext, isolate)) 49 if (!toV8TestPermissiveDictionary(*this, v8Object, creationContext, isolate))
50 return v8::Undefined(isolate); 50 return v8::Undefined(isolate);
51 return v8Object; 51 return v8Object;
52 } 52 }
53 53
54 bool toV8TestPermissiveDictionary(const TestPermissiveDictionary& impl, v8::Loca l<v8::Object> dictionary, v8::Local<v8::Object> creationContext, v8::Isolate* is olate) { 54 bool toV8TestPermissiveDictionary(const TestPermissiveDictionary& impl, v8::Loca l<v8::Object> dictionary, v8::Local<v8::Object> creationContext, v8::Isolate* is olate) {
55 v8::Local<v8::Value> booleanMemberValue;
56 bool booleanMemberHasValueOrDefault = false;
55 if (impl.hasBooleanMember()) { 57 if (impl.hasBooleanMember()) {
56 if (!v8CallBoolean(dictionary->CreateDataProperty(isolate->GetCurrentContext (), v8AtomicString(isolate, "booleanMember"), v8Boolean(impl.booleanMember(), is olate)))) 58 booleanMemberValue = v8Boolean(impl.booleanMember(), isolate);
57 return false; 59 booleanMemberHasValueOrDefault = true;
60 }
61 if (booleanMemberHasValueOrDefault &&
62 !v8CallBoolean(dictionary->CreateDataProperty(isolate->GetCurrentContext() , v8AtomicString(isolate, "booleanMember"), booleanMemberValue))) {
63 return false;
58 } 64 }
59 65
60 return true; 66 return true;
61 } 67 }
62 68
63 TestPermissiveDictionary NativeValueTraits<TestPermissiveDictionary>::nativeValu e(v8::Isolate* isolate, v8::Local<v8::Value> value, ExceptionState& exceptionSta te) { 69 TestPermissiveDictionary NativeValueTraits<TestPermissiveDictionary>::nativeValu e(v8::Isolate* isolate, v8::Local<v8::Value> value, ExceptionState& exceptionSta te) {
64 TestPermissiveDictionary impl; 70 TestPermissiveDictionary impl;
65 V8TestPermissiveDictionary::toImpl(isolate, value, impl, exceptionState); 71 V8TestPermissiveDictionary::toImpl(isolate, value, impl, exceptionState);
66 return impl; 72 return impl;
67 } 73 }
68 74
69 } // namespace blink 75 } // namespace blink
OLDNEW
« 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