OLD | NEW |
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 Loading... |
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 |
OLD | NEW |