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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 v8::Handle<v8::Object>::Cast(info.This())->ForceSet(name, v8Value); | 81 v8::Handle<v8::Object>::Cast(info.This())->ForceSet(name, v8Value); |
82 } | 82 } |
83 | 83 |
84 static void TestTypedefsForceSetAttributeOnThisCallback(v8::Local<v8::String> na
me, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 84 static void TestTypedefsForceSetAttributeOnThisCallback(v8::Local<v8::String> na
me, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
85 { | 85 { |
86 TestTypedefsV8Internal::TestTypedefsForceSetAttributeOnThis(name, v8Value, i
nfo); | 86 TestTypedefsV8Internal::TestTypedefsForceSetAttributeOnThis(name, v8Value, i
nfo); |
87 } | 87 } |
88 | 88 |
89 static void voidMethodArrayOfLongsArgMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 89 static void voidMethodArrayOfLongsArgMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
90 { | 90 { |
| 91 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodA
rrayOfLongsArg", "TestTypedefs", info.Holder(), info.GetIsolate()); |
91 TestTypedefs* impl = V8TestTypedefs::toImpl(info.Holder()); | 92 TestTypedefs* impl = V8TestTypedefs::toImpl(info.Holder()); |
92 Vector<int> arrayOfLongsArg; | 93 Vector<int> arrayOfLongsArg; |
93 { | 94 { |
94 v8::TryCatch block; | |
95 V8RethrowTryCatchScope rethrow(block); | |
96 if (UNLIKELY(info.Length() <= 0)) { | 95 if (UNLIKELY(info.Length() <= 0)) { |
97 impl->voidMethodArrayOfLongsArg(); | 96 impl->voidMethodArrayOfLongsArg(); |
98 return; | 97 return; |
99 } | 98 } |
100 TONATIVE_VOID_INTERNAL(arrayOfLongsArg, toImplArray<int>(info[0], 1, inf
o.GetIsolate())); | 99 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(arrayOfLongsArg, toImplArray<int>(
info[0], 1, info.GetIsolate(), exceptionState), exceptionState); |
101 } | 100 } |
102 impl->voidMethodArrayOfLongsArg(arrayOfLongsArg); | 101 impl->voidMethodArrayOfLongsArg(arrayOfLongsArg); |
103 } | 102 } |
104 | 103 |
105 static void voidMethodArrayOfLongsArgMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) | 104 static void voidMethodArrayOfLongsArgMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) |
106 { | 105 { |
107 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 106 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
108 TestTypedefsV8Internal::voidMethodArrayOfLongsArgMethod(info); | 107 TestTypedefsV8Internal::voidMethodArrayOfLongsArgMethod(info); |
109 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 108 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
110 } | 109 } |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 | 153 |
155 static void voidMethodTestCallbackInterfaceTypeArgMethodCallback(const v8::Funct
ionCallbackInfo<v8::Value>& info) | 154 static void voidMethodTestCallbackInterfaceTypeArgMethodCallback(const v8::Funct
ionCallbackInfo<v8::Value>& info) |
156 { | 155 { |
157 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 156 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
158 TestTypedefsV8Internal::voidMethodTestCallbackInterfaceTypeArgMethod(info); | 157 TestTypedefsV8Internal::voidMethodTestCallbackInterfaceTypeArgMethod(info); |
159 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 158 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
160 } | 159 } |
161 | 160 |
162 static void uLongLongMethodTestInterfaceEmptyTypeSequenceArgMethod(const v8::Fun
ctionCallbackInfo<v8::Value>& info) | 161 static void uLongLongMethodTestInterfaceEmptyTypeSequenceArgMethod(const v8::Fun
ctionCallbackInfo<v8::Value>& info) |
163 { | 162 { |
| 163 ExceptionState exceptionState(ExceptionState::ExecutionContext, "uLongLongMe
thodTestInterfaceEmptyTypeSequenceArg", "TestTypedefs", info.Holder(), info.GetI
solate()); |
164 if (UNLIKELY(info.Length() < 1)) { | 164 if (UNLIKELY(info.Length() < 1)) { |
165 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("u
LongLongMethodTestInterfaceEmptyTypeSequenceArg", "TestTypedefs", 1, info.Length
(), info.GetIsolate()), info.GetIsolate()); | 165 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| 166 exceptionState.throwIfNeeded(); |
166 return; | 167 return; |
167 } | 168 } |
168 TestTypedefs* impl = V8TestTypedefs::toImpl(info.Holder()); | 169 TestTypedefs* impl = V8TestTypedefs::toImpl(info.Holder()); |
169 Vector<RefPtr<TestInterfaceEmpty> > testInterfaceEmptyTypeSequenceArg; | 170 Vector<RefPtr<TestInterfaceEmpty> > testInterfaceEmptyTypeSequenceArg; |
170 { | 171 { |
171 v8::TryCatch block; | 172 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(testInterfaceEmptyTypeSequenceArg,
(toRefPtrNativeArray<TestInterfaceEmpty, V8TestInterfaceEmpty>(info[0], 1, info
.GetIsolate(), exceptionState)), exceptionState); |
172 V8RethrowTryCatchScope rethrow(block); | |
173 TONATIVE_VOID_INTERNAL(testInterfaceEmptyTypeSequenceArg, (toRefPtrNativ
eArray<TestInterfaceEmpty, V8TestInterfaceEmpty>(info[0], 1, info.GetIsolate()))
); | |
174 } | 173 } |
175 v8SetReturnValue(info, static_cast<double>(impl->uLongLongMethodTestInterfac
eEmptyTypeSequenceArg(testInterfaceEmptyTypeSequenceArg))); | 174 v8SetReturnValue(info, static_cast<double>(impl->uLongLongMethodTestInterfac
eEmptyTypeSequenceArg(testInterfaceEmptyTypeSequenceArg))); |
176 } | 175 } |
177 | 176 |
178 static void uLongLongMethodTestInterfaceEmptyTypeSequenceArgMethodCallback(const
v8::FunctionCallbackInfo<v8::Value>& info) | 177 static void uLongLongMethodTestInterfaceEmptyTypeSequenceArgMethodCallback(const
v8::FunctionCallbackInfo<v8::Value>& info) |
179 { | 178 { |
180 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 179 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
181 TestTypedefsV8Internal::uLongLongMethodTestInterfaceEmptyTypeSequenceArgMeth
od(info); | 180 TestTypedefsV8Internal::uLongLongMethodTestInterfaceEmptyTypeSequenceArgMeth
od(info); |
182 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 181 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
183 } | 182 } |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 | 224 |
226 static void domStringOrDoubleMethodMethodCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) | 225 static void domStringOrDoubleMethodMethodCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) |
227 { | 226 { |
228 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 227 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
229 TestTypedefsV8Internal::domStringOrDoubleMethodMethod(info); | 228 TestTypedefsV8Internal::domStringOrDoubleMethodMethod(info); |
230 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 229 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
231 } | 230 } |
232 | 231 |
233 static void arrayOfStringsMethodArrayOfStringsArgMethod(const v8::FunctionCallba
ckInfo<v8::Value>& info) | 232 static void arrayOfStringsMethodArrayOfStringsArgMethod(const v8::FunctionCallba
ckInfo<v8::Value>& info) |
234 { | 233 { |
| 234 ExceptionState exceptionState(ExceptionState::ExecutionContext, "arrayOfStri
ngsMethodArrayOfStringsArg", "TestTypedefs", info.Holder(), info.GetIsolate()); |
235 if (UNLIKELY(info.Length() < 1)) { | 235 if (UNLIKELY(info.Length() < 1)) { |
236 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("a
rrayOfStringsMethodArrayOfStringsArg", "TestTypedefs", 1, info.Length(), info.Ge
tIsolate()), info.GetIsolate()); | 236 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| 237 exceptionState.throwIfNeeded(); |
237 return; | 238 return; |
238 } | 239 } |
239 TestTypedefs* impl = V8TestTypedefs::toImpl(info.Holder()); | 240 TestTypedefs* impl = V8TestTypedefs::toImpl(info.Holder()); |
240 Vector<String> arrayOfStringsArg; | 241 Vector<String> arrayOfStringsArg; |
241 { | 242 { |
242 v8::TryCatch block; | 243 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(arrayOfStringsArg, toImplArray<Str
ing>(info[0], 1, info.GetIsolate(), exceptionState), exceptionState); |
243 V8RethrowTryCatchScope rethrow(block); | |
244 TONATIVE_VOID_INTERNAL(arrayOfStringsArg, toImplArray<String>(info[0], 1
, info.GetIsolate())); | |
245 } | 244 } |
246 v8SetReturnValue(info, v8Array(impl->arrayOfStringsMethodArrayOfStringsArg(a
rrayOfStringsArg), info.Holder(), info.GetIsolate())); | 245 v8SetReturnValue(info, v8Array(impl->arrayOfStringsMethodArrayOfStringsArg(a
rrayOfStringsArg), info.Holder(), info.GetIsolate())); |
247 } | 246 } |
248 | 247 |
249 static void arrayOfStringsMethodArrayOfStringsArgMethodCallback(const v8::Functi
onCallbackInfo<v8::Value>& info) | 248 static void arrayOfStringsMethodArrayOfStringsArgMethodCallback(const v8::Functi
onCallbackInfo<v8::Value>& info) |
250 { | 249 { |
251 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 250 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
252 TestTypedefsV8Internal::arrayOfStringsMethodArrayOfStringsArgMethod(info); | 251 TestTypedefsV8Internal::arrayOfStringsMethodArrayOfStringsArgMethod(info); |
253 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 252 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
254 } | 253 } |
255 | 254 |
256 static void stringArrayMethodStringArrayArgMethod(const v8::FunctionCallbackInfo
<v8::Value>& info) | 255 static void stringArrayMethodStringArrayArgMethod(const v8::FunctionCallbackInfo
<v8::Value>& info) |
257 { | 256 { |
| 257 ExceptionState exceptionState(ExceptionState::ExecutionContext, "stringArray
MethodStringArrayArg", "TestTypedefs", info.Holder(), info.GetIsolate()); |
258 if (UNLIKELY(info.Length() < 1)) { | 258 if (UNLIKELY(info.Length() < 1)) { |
259 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("s
tringArrayMethodStringArrayArg", "TestTypedefs", 1, info.Length(), info.GetIsola
te()), info.GetIsolate()); | 259 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| 260 exceptionState.throwIfNeeded(); |
260 return; | 261 return; |
261 } | 262 } |
262 TestTypedefs* impl = V8TestTypedefs::toImpl(info.Holder()); | 263 TestTypedefs* impl = V8TestTypedefs::toImpl(info.Holder()); |
263 Vector<String> stringArrayArg; | 264 Vector<String> stringArrayArg; |
264 { | 265 { |
265 v8::TryCatch block; | 266 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(stringArrayArg, toImplArray<String
>(info[0], 1, info.GetIsolate(), exceptionState), exceptionState); |
266 V8RethrowTryCatchScope rethrow(block); | |
267 TONATIVE_VOID_INTERNAL(stringArrayArg, toImplArray<String>(info[0], 1, i
nfo.GetIsolate())); | |
268 } | 267 } |
269 v8SetReturnValue(info, v8Array(impl->stringArrayMethodStringArrayArg(stringA
rrayArg), info.Holder(), info.GetIsolate())); | 268 v8SetReturnValue(info, v8Array(impl->stringArrayMethodStringArrayArg(stringA
rrayArg), info.Holder(), info.GetIsolate())); |
270 } | 269 } |
271 | 270 |
272 static void stringArrayMethodStringArrayArgMethodCallback(const v8::FunctionCall
backInfo<v8::Value>& info) | 271 static void stringArrayMethodStringArrayArgMethodCallback(const v8::FunctionCall
backInfo<v8::Value>& info) |
273 { | 272 { |
274 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 273 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
275 TestTypedefsV8Internal::stringArrayMethodStringArrayArgMethod(info); | 274 TestTypedefsV8Internal::stringArrayMethodStringArrayArgMethod(info); |
276 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 275 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
277 } | 276 } |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
382 return 0; | 381 return 0; |
383 } | 382 } |
384 | 383 |
385 template<> | 384 template<> |
386 v8::Handle<v8::Value> toV8NoInline(TestTypedefs* impl, v8::Handle<v8::Object> cr
eationContext, v8::Isolate* isolate) | 385 v8::Handle<v8::Value> toV8NoInline(TestTypedefs* impl, v8::Handle<v8::Object> cr
eationContext, v8::Isolate* isolate) |
387 { | 386 { |
388 return toV8(impl, creationContext, isolate); | 387 return toV8(impl, creationContext, isolate); |
389 } | 388 } |
390 | 389 |
391 } // namespace blink | 390 } // namespace blink |
OLD | NEW |