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 "V8TestDictionary.h" | 8 #include "V8TestDictionary.h" |
9 | 9 |
10 #include "bindings/core/v8/ExceptionState.h" | 10 #include "bindings/core/v8/ExceptionState.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 v8::Local<v8::Object> v8Object = v8Value->ToObject(isolate); | 34 v8::Local<v8::Object> v8Object = v8Value->ToObject(isolate); |
35 v8::TryCatch block; | 35 v8::TryCatch block; |
36 v8::Local<v8::Value> booleanMemberValue = v8Object->Get(v8String(isolate, "b
ooleanMember")); | 36 v8::Local<v8::Value> booleanMemberValue = v8Object->Get(v8String(isolate, "b
ooleanMember")); |
37 if (block.HasCaught()) { | 37 if (block.HasCaught()) { |
38 exceptionState.rethrowV8Exception(block.Exception()); | 38 exceptionState.rethrowV8Exception(block.Exception()); |
39 return; | 39 return; |
40 } | 40 } |
41 if (booleanMemberValue.IsEmpty() || booleanMemberValue->IsUndefined()) { | 41 if (booleanMemberValue.IsEmpty() || booleanMemberValue->IsUndefined()) { |
42 // Do nothing. | 42 // Do nothing. |
43 } else { | 43 } else { |
44 bool booleanMember = booleanMemberValue->BooleanValue(); | 44 bool booleanMember = toBoolean(isolate, booleanMemberValue, exceptionSta
te); |
| 45 if (exceptionState.hadException()) |
| 46 return; |
45 impl.setBooleanMember(booleanMember); | 47 impl.setBooleanMember(booleanMember); |
46 } | 48 } |
47 | 49 |
48 v8::Local<v8::Value> createValue = v8Object->Get(v8String(isolate, "create")
); | 50 v8::Local<v8::Value> createValue = v8Object->Get(v8String(isolate, "create")
); |
49 if (block.HasCaught()) { | 51 if (block.HasCaught()) { |
50 exceptionState.rethrowV8Exception(block.Exception()); | 52 exceptionState.rethrowV8Exception(block.Exception()); |
51 return; | 53 return; |
52 } | 54 } |
53 if (createValue.IsEmpty() || createValue->IsUndefined()) { | 55 if (createValue.IsEmpty() || createValue->IsUndefined()) { |
54 // Do nothing. | 56 // Do nothing. |
55 } else { | 57 } else { |
56 bool create = createValue->BooleanValue(); | 58 bool create = toBoolean(isolate, createValue, exceptionState); |
| 59 if (exceptionState.hadException()) |
| 60 return; |
57 impl.setCreateMember(create); | 61 impl.setCreateMember(create); |
58 } | 62 } |
59 | 63 |
60 v8::Local<v8::Value> deprecatedCreateMemberValue = v8Object->Get(v8String(is
olate, "deprecatedCreateMember")); | 64 v8::Local<v8::Value> deprecatedCreateMemberValue = v8Object->Get(v8String(is
olate, "deprecatedCreateMember")); |
61 if (block.HasCaught()) { | 65 if (block.HasCaught()) { |
62 exceptionState.rethrowV8Exception(block.Exception()); | 66 exceptionState.rethrowV8Exception(block.Exception()); |
63 return; | 67 return; |
64 } | 68 } |
65 if (deprecatedCreateMemberValue.IsEmpty() || deprecatedCreateMemberValue->Is
Undefined()) { | 69 if (deprecatedCreateMemberValue.IsEmpty() || deprecatedCreateMemberValue->Is
Undefined()) { |
66 // Do nothing. | 70 // Do nothing. |
67 } else { | 71 } else { |
68 UseCounter::countDeprecationIfNotPrivateScript(isolate, callingExecution
Context(isolate), UseCounter::CreateMember); | 72 UseCounter::countDeprecationIfNotPrivateScript(isolate, callingExecution
Context(isolate), UseCounter::CreateMember); |
69 bool deprecatedCreateMember = deprecatedCreateMemberValue->BooleanValue(
); | 73 bool deprecatedCreateMember = toBoolean(isolate, deprecatedCreateMemberV
alue, exceptionState); |
| 74 if (exceptionState.hadException()) |
| 75 return; |
70 impl.setCreateMember(deprecatedCreateMember); | 76 impl.setCreateMember(deprecatedCreateMember); |
71 } | 77 } |
72 | 78 |
73 v8::Local<v8::Value> doubleOrNullMemberValue = v8Object->Get(v8String(isolat
e, "doubleOrNullMember")); | 79 v8::Local<v8::Value> doubleOrNullMemberValue = v8Object->Get(v8String(isolat
e, "doubleOrNullMember")); |
74 if (block.HasCaught()) { | 80 if (block.HasCaught()) { |
75 exceptionState.rethrowV8Exception(block.Exception()); | 81 exceptionState.rethrowV8Exception(block.Exception()); |
76 return; | 82 return; |
77 } | 83 } |
78 if (doubleOrNullMemberValue.IsEmpty() || doubleOrNullMemberValue->IsUndefine
d()) { | 84 if (doubleOrNullMemberValue.IsEmpty() || doubleOrNullMemberValue->IsUndefine
d()) { |
79 // Do nothing. | 85 // Do nothing. |
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
619 } | 625 } |
620 | 626 |
621 TestDictionary NativeValueTraits<TestDictionary>::nativeValue(v8::Isolate* isola
te, v8::Local<v8::Value> value, ExceptionState& exceptionState) | 627 TestDictionary NativeValueTraits<TestDictionary>::nativeValue(v8::Isolate* isola
te, v8::Local<v8::Value> value, ExceptionState& exceptionState) |
622 { | 628 { |
623 TestDictionary impl; | 629 TestDictionary impl; |
624 V8TestDictionary::toImpl(isolate, value, impl, exceptionState); | 630 V8TestDictionary::toImpl(isolate, value, impl, exceptionState); |
625 return impl; | 631 return impl; |
626 } | 632 } |
627 | 633 |
628 } // namespace blink | 634 } // namespace blink |
OLD | NEW |