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. DO NOT MODIFY! | 5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY! |
6 | 6 |
7 #include "config.h" | 7 #include "config.h" |
8 #include "V8TestPermissiveDictionary.h" | 8 #include "V8TestPermissiveDictionary.h" |
9 | 9 |
10 #include "bindings/core/v8/ExceptionState.h" | 10 #include "bindings/core/v8/ExceptionState.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 return; | 27 return; |
28 } | 28 } |
29 v8::Local<v8::Value> booleanMemberValue = v8Object->Get(v8String(isolate, "b
ooleanMember")); | 29 v8::Local<v8::Value> booleanMemberValue = v8Object->Get(v8String(isolate, "b
ooleanMember")); |
30 if (block.HasCaught()) { | 30 if (block.HasCaught()) { |
31 exceptionState.rethrowV8Exception(block.Exception()); | 31 exceptionState.rethrowV8Exception(block.Exception()); |
32 return; | 32 return; |
33 } | 33 } |
34 if (booleanMemberValue.IsEmpty() || booleanMemberValue->IsUndefined()) { | 34 if (booleanMemberValue.IsEmpty() || booleanMemberValue->IsUndefined()) { |
35 // Do nothing. | 35 // Do nothing. |
36 } else { | 36 } else { |
37 bool booleanMember = booleanMemberValue->BooleanValue(); | 37 bool booleanMember = toBoolean(isolate, booleanMemberValue, exceptionSta
te); |
| 38 if (exceptionState.hadException()) |
| 39 return; |
38 impl.setBooleanMember(booleanMember); | 40 impl.setBooleanMember(booleanMember); |
39 } | 41 } |
40 | 42 |
41 } | 43 } |
42 | 44 |
43 v8::Local<v8::Value> toV8(const TestPermissiveDictionary& impl, v8::Local<v8::Ob
ject> creationContext, v8::Isolate* isolate) | 45 v8::Local<v8::Value> toV8(const TestPermissiveDictionary& impl, v8::Local<v8::Ob
ject> creationContext, v8::Isolate* isolate) |
44 { | 46 { |
45 v8::Local<v8::Object> v8Object = v8::Object::New(isolate); | 47 v8::Local<v8::Object> v8Object = v8::Object::New(isolate); |
46 toV8TestPermissiveDictionary(impl, v8Object, creationContext, isolate); | 48 toV8TestPermissiveDictionary(impl, v8Object, creationContext, isolate); |
47 return v8Object; | 49 return v8Object; |
48 } | 50 } |
49 | 51 |
50 void toV8TestPermissiveDictionary(const TestPermissiveDictionary& impl, v8::Loca
l<v8::Object> dictionary, v8::Local<v8::Object> creationContext, v8::Isolate* is
olate) | 52 void toV8TestPermissiveDictionary(const TestPermissiveDictionary& impl, v8::Loca
l<v8::Object> dictionary, v8::Local<v8::Object> creationContext, v8::Isolate* is
olate) |
51 { | 53 { |
52 if (impl.hasBooleanMember()) { | 54 if (impl.hasBooleanMember()) { |
53 dictionary->Set(v8String(isolate, "booleanMember"), v8Boolean(impl.boole
anMember(), isolate)); | 55 dictionary->Set(v8String(isolate, "booleanMember"), v8Boolean(impl.boole
anMember(), isolate)); |
54 } | 56 } |
55 | 57 |
56 } | 58 } |
57 | 59 |
58 TestPermissiveDictionary NativeValueTraits<TestPermissiveDictionary>::nativeValu
e(v8::Isolate* isolate, v8::Local<v8::Value> value, ExceptionState& exceptionSta
te) | 60 TestPermissiveDictionary NativeValueTraits<TestPermissiveDictionary>::nativeValu
e(v8::Isolate* isolate, v8::Local<v8::Value> value, ExceptionState& exceptionSta
te) |
59 { | 61 { |
60 TestPermissiveDictionary impl; | 62 TestPermissiveDictionary impl; |
61 V8TestPermissiveDictionary::toImpl(isolate, value, impl, exceptionState); | 63 V8TestPermissiveDictionary::toImpl(isolate, value, impl, exceptionState); |
62 return impl; | 64 return impl; |
63 } | 65 } |
64 | 66 |
65 } // namespace blink | 67 } // namespace blink |
OLD | NEW |