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 "LongOrTestDictionary.h" | 7 #include "LongOrTestDictionary.h" |
8 | 8 |
9 #include "bindings/core/v8/DoubleOrString.h" | 9 #include "bindings/core/v8/DoubleOrString.h" |
10 #include "bindings/core/v8/TestInterface2OrUint8Array.h" | 10 #include "bindings/core/v8/TestInterface2OrUint8Array.h" |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 } | 67 } |
68 | 68 |
69 void V8LongOrTestDictionary::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v
8Value, LongOrTestDictionary& impl, UnionTypeConversionMode conversionMode, Exce
ptionState& exceptionState) | 69 void V8LongOrTestDictionary::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v
8Value, LongOrTestDictionary& impl, UnionTypeConversionMode conversionMode, Exce
ptionState& exceptionState) |
70 { | 70 { |
71 if (v8Value.IsEmpty()) | 71 if (v8Value.IsEmpty()) |
72 return; | 72 return; |
73 | 73 |
74 if (conversionMode == UnionTypeConversionMode::Nullable && isUndefinedOrNull
(v8Value)) | 74 if (conversionMode == UnionTypeConversionMode::Nullable && isUndefinedOrNull
(v8Value)) |
75 return; | 75 return; |
76 | 76 |
77 if (isUndefinedOrNull(v8Value) || (v8Value->IsObject() && !v8Value->IsArray(
))) { | 77 if (isUndefinedOrNull(v8Value)) { |
78 TestDictionary cppValue; | 78 TestDictionary cppValue; |
79 V8TestDictionary::toImpl(isolate, v8Value, cppValue, exceptionState); | 79 V8TestDictionary::toImpl(isolate, v8Value, cppValue, exceptionState); |
80 if (exceptionState.hadException()) | 80 if (exceptionState.hadException()) |
| 81 return; |
| 82 impl.setTestDictionary(cppValue); |
| 83 return; |
| 84 } |
| 85 |
| 86 if (v8Value->IsObject()) { |
| 87 TestDictionary cppValue; |
| 88 V8TestDictionary::toImpl(isolate, v8Value, cppValue, exceptionState); |
| 89 if (exceptionState.hadException()) |
81 return; | 90 return; |
82 impl.setTestDictionary(cppValue); | 91 impl.setTestDictionary(cppValue); |
83 return; | 92 return; |
84 } | 93 } |
85 | 94 |
86 if (v8Value->IsNumber()) { | 95 if (v8Value->IsNumber()) { |
87 int cppValue = toInt32(isolate, v8Value, NormalConversion, exceptionStat
e); | 96 int cppValue = toInt32(isolate, v8Value, NormalConversion, exceptionStat
e); |
88 if (exceptionState.hadException()) | 97 if (exceptionState.hadException()) |
89 return; | 98 return; |
90 impl.setLong(cppValue); | 99 impl.setLong(cppValue); |
(...skipping 26 matching lines...) Expand all Loading... |
117 } | 126 } |
118 | 127 |
119 LongOrTestDictionary NativeValueTraits<LongOrTestDictionary>::nativeValue(v8::Is
olate* isolate, v8::Local<v8::Value> value, ExceptionState& exceptionState) | 128 LongOrTestDictionary NativeValueTraits<LongOrTestDictionary>::nativeValue(v8::Is
olate* isolate, v8::Local<v8::Value> value, ExceptionState& exceptionState) |
120 { | 129 { |
121 LongOrTestDictionary impl; | 130 LongOrTestDictionary impl; |
122 V8LongOrTestDictionary::toImpl(isolate, value, impl, UnionTypeConversionMode
::NotNullable, exceptionState); | 131 V8LongOrTestDictionary::toImpl(isolate, value, impl, UnionTypeConversionMode
::NotNullable, exceptionState); |
123 return impl; | 132 return impl; |
124 } | 133 } |
125 | 134 |
126 } // namespace blink | 135 } // namespace blink |
OLD | NEW |