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 "V8TestTypedefs.h" | 8 #include "V8TestTypedefs.h" |
9 | 9 |
10 #include "bindings/core/v8/ExceptionState.h" | 10 #include "bindings/core/v8/ExceptionState.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 46 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
47 TestTypedefsV8Internal::uLongLongAttributeAttributeGetter(info); | 47 TestTypedefsV8Internal::uLongLongAttributeAttributeGetter(info); |
48 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 48 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
49 } | 49 } |
50 | 50 |
51 static void uLongLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, cons
t v8::PropertyCallbackInfo<void>& info) | 51 static void uLongLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, cons
t v8::PropertyCallbackInfo<void>& info) |
52 { | 52 { |
53 v8::Local<v8::Object> holder = info.Holder(); | 53 v8::Local<v8::Object> holder = info.Holder(); |
54 ExceptionState exceptionState(ExceptionState::SetterContext, "uLongLongAttri
bute", "TestTypedefs", holder, info.GetIsolate()); | 54 ExceptionState exceptionState(ExceptionState::SetterContext, "uLongLongAttri
bute", "TestTypedefs", holder, info.GetIsolate()); |
55 TestTypedefs* impl = V8TestTypedefs::toImpl(holder); | 55 TestTypedefs* impl = V8TestTypedefs::toImpl(holder); |
56 TONATIVE_VOID_EXCEPTIONSTATE(unsigned long long, cppValue, toUInt64(v8Value,
exceptionState), exceptionState); | 56 unsigned long long cppValue = toUInt64(v8Value, exceptionState); |
| 57 if (exceptionState.throwIfNeeded()) |
| 58 return; |
57 impl->setULongLongAttribute(cppValue); | 59 impl->setULongLongAttribute(cppValue); |
58 } | 60 } |
59 | 61 |
60 static void uLongLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8:
:Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 62 static void uLongLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8:
:Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
61 { | 63 { |
62 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 64 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
63 TestTypedefsV8Internal::uLongLongAttributeAttributeSetter(v8Value, info); | 65 TestTypedefsV8Internal::uLongLongAttributeAttributeSetter(v8Value, info); |
64 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 66 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
65 } | 67 } |
66 | 68 |
(...skipping 21 matching lines...) Expand all Loading... |
88 static void voidMethodArrayOfLongsArgMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 90 static void voidMethodArrayOfLongsArgMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
89 { | 91 { |
90 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodA
rrayOfLongsArg", "TestTypedefs", info.Holder(), info.GetIsolate()); | 92 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodA
rrayOfLongsArg", "TestTypedefs", info.Holder(), info.GetIsolate()); |
91 TestTypedefs* impl = V8TestTypedefs::toImpl(info.Holder()); | 93 TestTypedefs* impl = V8TestTypedefs::toImpl(info.Holder()); |
92 Vector<int> arrayOfLongsArg; | 94 Vector<int> arrayOfLongsArg; |
93 { | 95 { |
94 if (UNLIKELY(info.Length() <= 0)) { | 96 if (UNLIKELY(info.Length() <= 0)) { |
95 impl->voidMethodArrayOfLongsArg(); | 97 impl->voidMethodArrayOfLongsArg(); |
96 return; | 98 return; |
97 } | 99 } |
98 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(arrayOfLongsArg, toImplArray<int>(
info[0], 1, info.GetIsolate(), exceptionState), exceptionState); | 100 arrayOfLongsArg = toImplArray<int>(info[0], 1, info.GetIsolate(), except
ionState); |
| 101 if (exceptionState.throwIfNeeded()) |
| 102 return; |
99 } | 103 } |
100 impl->voidMethodArrayOfLongsArg(arrayOfLongsArg); | 104 impl->voidMethodArrayOfLongsArg(arrayOfLongsArg); |
101 } | 105 } |
102 | 106 |
103 static void voidMethodArrayOfLongsArgMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) | 107 static void voidMethodArrayOfLongsArgMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) |
104 { | 108 { |
105 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 109 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
106 TestTypedefsV8Internal::voidMethodArrayOfLongsArgMethod(info); | 110 TestTypedefsV8Internal::voidMethodArrayOfLongsArgMethod(info); |
107 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 111 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
108 } | 112 } |
109 | 113 |
110 static void voidMethodFloatArgStringArgMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) | 114 static void voidMethodFloatArgStringArgMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) |
111 { | 115 { |
112 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodF
loatArgStringArg", "TestTypedefs", info.Holder(), info.GetIsolate()); | 116 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodF
loatArgStringArg", "TestTypedefs", info.Holder(), info.GetIsolate()); |
113 if (UNLIKELY(info.Length() < 2)) { | 117 if (UNLIKELY(info.Length() < 2)) { |
114 setMinimumArityTypeError(exceptionState, 2, info.Length()); | 118 setMinimumArityTypeError(exceptionState, 2, info.Length()); |
115 exceptionState.throwIfNeeded(); | 119 exceptionState.throwIfNeeded(); |
116 return; | 120 return; |
117 } | 121 } |
118 TestTypedefs* impl = V8TestTypedefs::toImpl(info.Holder()); | 122 TestTypedefs* impl = V8TestTypedefs::toImpl(info.Holder()); |
119 float floatArg; | 123 float floatArg; |
120 V8StringResource<> stringArg; | 124 V8StringResource<> stringArg; |
121 { | 125 { |
122 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(floatArg, toFloat(info[0], excepti
onState), exceptionState); | 126 floatArg = toFloat(info[0], exceptionState); |
123 TOSTRING_VOID_INTERNAL(stringArg, info[1]); | 127 if (exceptionState.throwIfNeeded()) |
| 128 return; |
| 129 stringArg = info[1]; |
| 130 if (!stringArg.prepare()) |
| 131 return; |
124 } | 132 } |
125 impl->voidMethodFloatArgStringArg(floatArg, stringArg); | 133 impl->voidMethodFloatArgStringArg(floatArg, stringArg); |
126 } | 134 } |
127 | 135 |
128 static void voidMethodFloatArgStringArgMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) | 136 static void voidMethodFloatArgStringArgMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) |
129 { | 137 { |
130 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 138 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
131 TestTypedefsV8Internal::voidMethodFloatArgStringArgMethod(info); | 139 TestTypedefsV8Internal::voidMethodFloatArgStringArgMethod(info); |
132 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 140 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
133 } | 141 } |
(...skipping 27 matching lines...) Expand all Loading... |
161 { | 169 { |
162 ExceptionState exceptionState(ExceptionState::ExecutionContext, "uLongLongMe
thodTestInterfaceEmptyTypeSequenceArg", "TestTypedefs", info.Holder(), info.GetI
solate()); | 170 ExceptionState exceptionState(ExceptionState::ExecutionContext, "uLongLongMe
thodTestInterfaceEmptyTypeSequenceArg", "TestTypedefs", info.Holder(), info.GetI
solate()); |
163 if (UNLIKELY(info.Length() < 1)) { | 171 if (UNLIKELY(info.Length() < 1)) { |
164 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 172 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
165 exceptionState.throwIfNeeded(); | 173 exceptionState.throwIfNeeded(); |
166 return; | 174 return; |
167 } | 175 } |
168 TestTypedefs* impl = V8TestTypedefs::toImpl(info.Holder()); | 176 TestTypedefs* impl = V8TestTypedefs::toImpl(info.Holder()); |
169 Vector<RefPtr<TestInterfaceEmpty>> testInterfaceEmptyTypeSequenceArg; | 177 Vector<RefPtr<TestInterfaceEmpty>> testInterfaceEmptyTypeSequenceArg; |
170 { | 178 { |
171 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(testInterfaceEmptyTypeSequenceArg,
(toRefPtrNativeArray<TestInterfaceEmpty, V8TestInterfaceEmpty>(info[0], 1, info
.GetIsolate(), exceptionState)), exceptionState); | 179 testInterfaceEmptyTypeSequenceArg = (toRefPtrNativeArray<TestInterfaceEm
pty, V8TestInterfaceEmpty>(info[0], 1, info.GetIsolate(), exceptionState)); |
| 180 if (exceptionState.throwIfNeeded()) |
| 181 return; |
172 } | 182 } |
173 v8SetReturnValue(info, static_cast<double>(impl->uLongLongMethodTestInterfac
eEmptyTypeSequenceArg(testInterfaceEmptyTypeSequenceArg))); | 183 v8SetReturnValue(info, static_cast<double>(impl->uLongLongMethodTestInterfac
eEmptyTypeSequenceArg(testInterfaceEmptyTypeSequenceArg))); |
174 } | 184 } |
175 | 185 |
176 static void uLongLongMethodTestInterfaceEmptyTypeSequenceArgMethodCallback(const
v8::FunctionCallbackInfo<v8::Value>& info) | 186 static void uLongLongMethodTestInterfaceEmptyTypeSequenceArgMethodCallback(const
v8::FunctionCallbackInfo<v8::Value>& info) |
177 { | 187 { |
178 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 188 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
179 TestTypedefsV8Internal::uLongLongMethodTestInterfaceEmptyTypeSequenceArgMeth
od(info); | 189 TestTypedefsV8Internal::uLongLongMethodTestInterfaceEmptyTypeSequenceArgMeth
od(info); |
180 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 190 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
181 } | 191 } |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 { | 224 { |
215 ExceptionState exceptionState(ExceptionState::ExecutionContext, "arrayOfStri
ngsMethodArrayOfStringsArg", "TestTypedefs", info.Holder(), info.GetIsolate()); | 225 ExceptionState exceptionState(ExceptionState::ExecutionContext, "arrayOfStri
ngsMethodArrayOfStringsArg", "TestTypedefs", info.Holder(), info.GetIsolate()); |
216 if (UNLIKELY(info.Length() < 1)) { | 226 if (UNLIKELY(info.Length() < 1)) { |
217 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 227 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
218 exceptionState.throwIfNeeded(); | 228 exceptionState.throwIfNeeded(); |
219 return; | 229 return; |
220 } | 230 } |
221 TestTypedefs* impl = V8TestTypedefs::toImpl(info.Holder()); | 231 TestTypedefs* impl = V8TestTypedefs::toImpl(info.Holder()); |
222 Vector<String> arrayOfStringsArg; | 232 Vector<String> arrayOfStringsArg; |
223 { | 233 { |
224 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(arrayOfStringsArg, toImplArray<Str
ing>(info[0], 1, info.GetIsolate(), exceptionState), exceptionState); | 234 arrayOfStringsArg = toImplArray<String>(info[0], 1, info.GetIsolate(), e
xceptionState); |
| 235 if (exceptionState.throwIfNeeded()) |
| 236 return; |
225 } | 237 } |
226 v8SetReturnValue(info, toV8(impl->arrayOfStringsMethodArrayOfStringsArg(arra
yOfStringsArg), info.Holder(), info.GetIsolate())); | 238 v8SetReturnValue(info, toV8(impl->arrayOfStringsMethodArrayOfStringsArg(arra
yOfStringsArg), info.Holder(), info.GetIsolate())); |
227 } | 239 } |
228 | 240 |
229 static void arrayOfStringsMethodArrayOfStringsArgMethodCallback(const v8::Functi
onCallbackInfo<v8::Value>& info) | 241 static void arrayOfStringsMethodArrayOfStringsArgMethodCallback(const v8::Functi
onCallbackInfo<v8::Value>& info) |
230 { | 242 { |
231 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 243 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
232 TestTypedefsV8Internal::arrayOfStringsMethodArrayOfStringsArgMethod(info); | 244 TestTypedefsV8Internal::arrayOfStringsMethodArrayOfStringsArgMethod(info); |
233 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 245 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
234 } | 246 } |
235 | 247 |
236 static void stringArrayMethodStringArrayArgMethod(const v8::FunctionCallbackInfo
<v8::Value>& info) | 248 static void stringArrayMethodStringArrayArgMethod(const v8::FunctionCallbackInfo
<v8::Value>& info) |
237 { | 249 { |
238 ExceptionState exceptionState(ExceptionState::ExecutionContext, "stringArray
MethodStringArrayArg", "TestTypedefs", info.Holder(), info.GetIsolate()); | 250 ExceptionState exceptionState(ExceptionState::ExecutionContext, "stringArray
MethodStringArrayArg", "TestTypedefs", info.Holder(), info.GetIsolate()); |
239 if (UNLIKELY(info.Length() < 1)) { | 251 if (UNLIKELY(info.Length() < 1)) { |
240 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 252 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
241 exceptionState.throwIfNeeded(); | 253 exceptionState.throwIfNeeded(); |
242 return; | 254 return; |
243 } | 255 } |
244 TestTypedefs* impl = V8TestTypedefs::toImpl(info.Holder()); | 256 TestTypedefs* impl = V8TestTypedefs::toImpl(info.Holder()); |
245 Vector<String> stringArrayArg; | 257 Vector<String> stringArrayArg; |
246 { | 258 { |
247 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(stringArrayArg, toImplArray<String
>(info[0], 1, info.GetIsolate(), exceptionState), exceptionState); | 259 stringArrayArg = toImplArray<String>(info[0], 1, info.GetIsolate(), exce
ptionState); |
| 260 if (exceptionState.throwIfNeeded()) |
| 261 return; |
248 } | 262 } |
249 v8SetReturnValue(info, toV8(impl->stringArrayMethodStringArrayArg(stringArra
yArg), info.Holder(), info.GetIsolate())); | 263 v8SetReturnValue(info, toV8(impl->stringArrayMethodStringArrayArg(stringArra
yArg), info.Holder(), info.GetIsolate())); |
250 } | 264 } |
251 | 265 |
252 static void stringArrayMethodStringArrayArgMethodCallback(const v8::FunctionCall
backInfo<v8::Value>& info) | 266 static void stringArrayMethodStringArrayArgMethodCallback(const v8::FunctionCall
backInfo<v8::Value>& info) |
253 { | 267 { |
254 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 268 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
255 TestTypedefsV8Internal::stringArrayMethodStringArrayArgMethod(info); | 269 TestTypedefsV8Internal::stringArrayMethodStringArrayArgMethod(info); |
256 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 270 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
257 } | 271 } |
258 | 272 |
259 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) | 273 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) |
260 { | 274 { |
261 if (UNLIKELY(info.Length() < 1)) { | 275 if (UNLIKELY(info.Length() < 1)) { |
262 V8ThrowException::throwException(createMinimumArityTypeErrorForConstruct
or(info.GetIsolate(), "TestTypedefs", 1, info.Length()), info.GetIsolate()); | 276 V8ThrowException::throwException(createMinimumArityTypeErrorForConstruct
or(info.GetIsolate(), "TestTypedefs", 1, info.Length()), info.GetIsolate()); |
263 return; | 277 return; |
264 } | 278 } |
265 V8StringResource<> stringArg; | 279 V8StringResource<> stringArg; |
266 { | 280 { |
267 TOSTRING_VOID_INTERNAL(stringArg, info[0]); | 281 stringArg = info[0]; |
| 282 if (!stringArg.prepare()) |
| 283 return; |
268 } | 284 } |
269 RefPtr<TestTypedefs> impl = TestTypedefs::create(stringArg); | 285 RefPtr<TestTypedefs> impl = TestTypedefs::create(stringArg); |
270 v8::Local<v8::Object> wrapper = info.Holder(); | 286 v8::Local<v8::Object> wrapper = info.Holder(); |
271 impl->associateWithWrapper(info.GetIsolate(), &V8TestTypedefs::wrapperTypeIn
fo, wrapper); | 287 impl->associateWithWrapper(info.GetIsolate(), &V8TestTypedefs::wrapperTypeIn
fo, wrapper); |
272 v8SetReturnValue(info, wrapper); | 288 v8SetReturnValue(info, wrapper); |
273 } | 289 } |
274 | 290 |
275 } // namespace TestTypedefsV8Internal | 291 } // namespace TestTypedefsV8Internal |
276 | 292 |
277 static const V8DOMConfiguration::AttributeConfiguration V8TestTypedefsAttributes
[] = { | 293 static const V8DOMConfiguration::AttributeConfiguration V8TestTypedefsAttributes
[] = { |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 { | 366 { |
351 scriptWrappable->toImpl<TestTypedefs>()->ref(); | 367 scriptWrappable->toImpl<TestTypedefs>()->ref(); |
352 } | 368 } |
353 | 369 |
354 void V8TestTypedefs::derefObject(ScriptWrappable* scriptWrappable) | 370 void V8TestTypedefs::derefObject(ScriptWrappable* scriptWrappable) |
355 { | 371 { |
356 scriptWrappable->toImpl<TestTypedefs>()->deref(); | 372 scriptWrappable->toImpl<TestTypedefs>()->deref(); |
357 } | 373 } |
358 | 374 |
359 } // namespace blink | 375 } // namespace blink |
OLD | NEW |