| 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 12 matching lines...) Expand all Loading... |
| 23 v8::Local<v8::Object> v8Object = v8Value->ToObject(isolate); | 23 v8::Local<v8::Object> v8Object = v8Value->ToObject(isolate); |
| 24 v8::TryCatch block; | 24 v8::TryCatch block; |
| 25 v8::Local<v8::Value> booleanMemberValue = v8Object->Get(v8String(isolate, "b
ooleanMember")); | 25 v8::Local<v8::Value> booleanMemberValue = v8Object->Get(v8String(isolate, "b
ooleanMember")); |
| 26 if (block.HasCaught()) { | 26 if (block.HasCaught()) { |
| 27 exceptionState.rethrowV8Exception(block.Exception()); | 27 exceptionState.rethrowV8Exception(block.Exception()); |
| 28 return; | 28 return; |
| 29 } | 29 } |
| 30 if (booleanMemberValue.IsEmpty() || booleanMemberValue->IsUndefined()) { | 30 if (booleanMemberValue.IsEmpty() || booleanMemberValue->IsUndefined()) { |
| 31 // Do nothing. | 31 // Do nothing. |
| 32 } else { | 32 } else { |
| 33 bool booleanMember = booleanMemberValue->BooleanValue(); | 33 bool booleanMember = toBoolean(isolate, booleanMemberValue, exceptionSta
te); |
| 34 if (exceptionState.hadException()) |
| 35 return; |
| 34 impl.setBooleanMember(booleanMember); | 36 impl.setBooleanMember(booleanMember); |
| 35 } | 37 } |
| 36 | 38 |
| 37 } | 39 } |
| 38 | 40 |
| 39 v8::Local<v8::Value> toV8(const TestPermissiveDictionary& impl, v8::Local<v8::Ob
ject> creationContext, v8::Isolate* isolate) | 41 v8::Local<v8::Value> toV8(const TestPermissiveDictionary& impl, v8::Local<v8::Ob
ject> creationContext, v8::Isolate* isolate) |
| 40 { | 42 { |
| 41 v8::Local<v8::Object> v8Object = v8::Object::New(isolate); | 43 v8::Local<v8::Object> v8Object = v8::Object::New(isolate); |
| 42 toV8TestPermissiveDictionary(impl, v8Object, creationContext, isolate); | 44 toV8TestPermissiveDictionary(impl, v8Object, creationContext, isolate); |
| 43 return v8Object; | 45 return v8Object; |
| 44 } | 46 } |
| 45 | 47 |
| 46 void toV8TestPermissiveDictionary(const TestPermissiveDictionary& impl, v8::Loca
l<v8::Object> dictionary, v8::Local<v8::Object> creationContext, v8::Isolate* is
olate) | 48 void toV8TestPermissiveDictionary(const TestPermissiveDictionary& impl, v8::Loca
l<v8::Object> dictionary, v8::Local<v8::Object> creationContext, v8::Isolate* is
olate) |
| 47 { | 49 { |
| 48 if (impl.hasBooleanMember()) { | 50 if (impl.hasBooleanMember()) { |
| 49 dictionary->Set(v8String(isolate, "booleanMember"), v8Boolean(impl.boole
anMember(), isolate)); | 51 dictionary->Set(v8String(isolate, "booleanMember"), v8Boolean(impl.boole
anMember(), isolate)); |
| 50 } | 52 } |
| 51 | 53 |
| 52 } | 54 } |
| 53 | 55 |
| 54 TestPermissiveDictionary NativeValueTraits<TestPermissiveDictionary>::nativeValu
e(v8::Isolate* isolate, v8::Local<v8::Value> value, ExceptionState& exceptionSta
te) | 56 TestPermissiveDictionary NativeValueTraits<TestPermissiveDictionary>::nativeValu
e(v8::Isolate* isolate, v8::Local<v8::Value> value, ExceptionState& exceptionSta
te) |
| 55 { | 57 { |
| 56 TestPermissiveDictionary impl; | 58 TestPermissiveDictionary impl; |
| 57 V8TestPermissiveDictionary::toImpl(isolate, value, impl, exceptionState); | 59 V8TestPermissiveDictionary::toImpl(isolate, value, impl, exceptionState); |
| 58 return impl; | 60 return impl; |
| 59 } | 61 } |
| 60 | 62 |
| 61 } // namespace blink | 63 } // namespace blink |
| OLD | NEW |