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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 static void voidMethodArrayOfLongsArgMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) | 116 static void voidMethodArrayOfLongsArgMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) |
117 { | 117 { |
118 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 118 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
119 TestTypedefsV8Internal::voidMethodArrayOfLongsArgMethod(info); | 119 TestTypedefsV8Internal::voidMethodArrayOfLongsArgMethod(info); |
120 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 120 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
121 } | 121 } |
122 | 122 |
123 static void voidMethodFloatArgStringArgMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) | 123 static void voidMethodFloatArgStringArgMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) |
124 { | 124 { |
125 if (UNLIKELY(info.Length() < 2)) { | 125 if (UNLIKELY(info.Length() < 2)) { |
126 throwMinimumArityTypeErrorForMethod("voidMethodFloatArgStringArg", "Test
Typedefs", 2, info.Length(), info.GetIsolate()); | 126 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodFloatArgStringArg", "TestTypedefs", 2, info.Length(), info.GetIsolate()
), info.GetIsolate()); |
127 return; | 127 return; |
128 } | 128 } |
129 TestTypedefs* impl = V8TestTypedefs::toNative(info.Holder()); | 129 TestTypedefs* impl = V8TestTypedefs::toNative(info.Holder()); |
130 float floatArg; | 130 float floatArg; |
131 V8StringResource<> stringArg; | 131 V8StringResource<> stringArg; |
132 { | 132 { |
133 v8::TryCatch block; | 133 v8::TryCatch block; |
134 V8RethrowTryCatchScope rethrow(block); | 134 V8RethrowTryCatchScope rethrow(block); |
135 TONATIVE_VOID_INTERNAL(floatArg, static_cast<float>(info[0]->NumberValue
())); | 135 TONATIVE_VOID_INTERNAL(floatArg, static_cast<float>(info[0]->NumberValue
())); |
136 TOSTRING_VOID_INTERNAL(stringArg, info[1]); | 136 TOSTRING_VOID_INTERNAL(stringArg, info[1]); |
137 } | 137 } |
138 impl->voidMethodFloatArgStringArg(floatArg, stringArg); | 138 impl->voidMethodFloatArgStringArg(floatArg, stringArg); |
139 } | 139 } |
140 | 140 |
141 static void voidMethodFloatArgStringArgMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) | 141 static void voidMethodFloatArgStringArgMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) |
142 { | 142 { |
143 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 143 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
144 TestTypedefsV8Internal::voidMethodFloatArgStringArgMethod(info); | 144 TestTypedefsV8Internal::voidMethodFloatArgStringArgMethod(info); |
145 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 145 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
146 } | 146 } |
147 | 147 |
148 static void voidMethodTestCallbackInterfaceTypeArgMethod(const v8::FunctionCallb
ackInfo<v8::Value>& info) | 148 static void voidMethodTestCallbackInterfaceTypeArgMethod(const v8::FunctionCallb
ackInfo<v8::Value>& info) |
149 { | 149 { |
150 if (UNLIKELY(info.Length() < 1)) { | 150 if (UNLIKELY(info.Length() < 1)) { |
151 throwMinimumArityTypeErrorForMethod("voidMethodTestCallbackInterfaceType
Arg", "TestTypedefs", 1, info.Length(), info.GetIsolate()); | 151 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodTestCallbackInterfaceTypeArg", "TestTypedefs", 1, info.Length(), info.G
etIsolate()), info.GetIsolate()); |
152 return; | 152 return; |
153 } | 153 } |
154 TestTypedefs* impl = V8TestTypedefs::toNative(info.Holder()); | 154 TestTypedefs* impl = V8TestTypedefs::toNative(info.Holder()); |
155 OwnPtr<TestCallbackInterface> testCallbackInterfaceTypeArg; | 155 OwnPtr<TestCallbackInterface> testCallbackInterfaceTypeArg; |
156 { | 156 { |
157 if (info.Length() <= 0 || !info[0]->IsFunction()) { | 157 if (info.Length() <= 0 || !info[0]->IsFunction()) { |
158 V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute(
"voidMethodTestCallbackInterfaceTypeArg", "TestTypedefs", "The callback provided
as parameter 1 is not a function."), info.GetIsolate()); | 158 V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute(
"voidMethodTestCallbackInterfaceTypeArg", "TestTypedefs", "The callback provided
as parameter 1 is not a function."), info.GetIsolate()); |
159 return; | 159 return; |
160 } | 160 } |
161 testCallbackInterfaceTypeArg = V8TestCallbackInterface::create(v8::Handl
e<v8::Function>::Cast(info[0]), ScriptState::current(info.GetIsolate())); | 161 testCallbackInterfaceTypeArg = V8TestCallbackInterface::create(v8::Handl
e<v8::Function>::Cast(info[0]), ScriptState::current(info.GetIsolate())); |
162 } | 162 } |
163 impl->voidMethodTestCallbackInterfaceTypeArg(testCallbackInterfaceTypeArg.re
lease()); | 163 impl->voidMethodTestCallbackInterfaceTypeArg(testCallbackInterfaceTypeArg.re
lease()); |
164 } | 164 } |
165 | 165 |
166 static void voidMethodTestCallbackInterfaceTypeArgMethodCallback(const v8::Funct
ionCallbackInfo<v8::Value>& info) | 166 static void voidMethodTestCallbackInterfaceTypeArgMethodCallback(const v8::Funct
ionCallbackInfo<v8::Value>& info) |
167 { | 167 { |
168 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 168 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
169 TestTypedefsV8Internal::voidMethodTestCallbackInterfaceTypeArgMethod(info); | 169 TestTypedefsV8Internal::voidMethodTestCallbackInterfaceTypeArgMethod(info); |
170 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 170 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
171 } | 171 } |
172 | 172 |
173 static void uLongLongMethodTestInterfaceEmptyTypeSequenceArgMethod(const v8::Fun
ctionCallbackInfo<v8::Value>& info) | 173 static void uLongLongMethodTestInterfaceEmptyTypeSequenceArgMethod(const v8::Fun
ctionCallbackInfo<v8::Value>& info) |
174 { | 174 { |
175 if (UNLIKELY(info.Length() < 1)) { | 175 if (UNLIKELY(info.Length() < 1)) { |
176 throwMinimumArityTypeErrorForMethod("uLongLongMethodTestInterfaceEmptyTy
peSequenceArg", "TestTypedefs", 1, info.Length(), info.GetIsolate()); | 176 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("u
LongLongMethodTestInterfaceEmptyTypeSequenceArg", "TestTypedefs", 1, info.Length
(), info.GetIsolate()), info.GetIsolate()); |
177 return; | 177 return; |
178 } | 178 } |
179 TestTypedefs* impl = V8TestTypedefs::toNative(info.Holder()); | 179 TestTypedefs* impl = V8TestTypedefs::toNative(info.Holder()); |
180 Vector<RefPtr<TestInterfaceEmpty> > testInterfaceEmptyTypeSequenceArg; | 180 Vector<RefPtr<TestInterfaceEmpty> > testInterfaceEmptyTypeSequenceArg; |
181 { | 181 { |
182 v8::TryCatch block; | 182 v8::TryCatch block; |
183 V8RethrowTryCatchScope rethrow(block); | 183 V8RethrowTryCatchScope rethrow(block); |
184 TONATIVE_VOID_INTERNAL(testInterfaceEmptyTypeSequenceArg, (toRefPtrNativ
eArray<TestInterfaceEmpty, V8TestInterfaceEmpty>(info[0], 1, info.GetIsolate()))
); | 184 TONATIVE_VOID_INTERNAL(testInterfaceEmptyTypeSequenceArg, (toRefPtrNativ
eArray<TestInterfaceEmpty, V8TestInterfaceEmpty>(info[0], 1, info.GetIsolate()))
); |
185 } | 185 } |
186 v8SetReturnValue(info, static_cast<double>(impl->uLongLongMethodTestInterfac
eEmptyTypeSequenceArg(testInterfaceEmptyTypeSequenceArg))); | 186 v8SetReturnValue(info, static_cast<double>(impl->uLongLongMethodTestInterfac
eEmptyTypeSequenceArg(testInterfaceEmptyTypeSequenceArg))); |
(...skipping 28 matching lines...) Expand all Loading... |
215 static void testInterfaceOrTestInterfaceEmptyMethodMethodCallback(const v8::Func
tionCallbackInfo<v8::Value>& info) | 215 static void testInterfaceOrTestInterfaceEmptyMethodMethodCallback(const v8::Func
tionCallbackInfo<v8::Value>& info) |
216 { | 216 { |
217 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 217 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
218 TestTypedefsV8Internal::testInterfaceOrTestInterfaceEmptyMethodMethod(info); | 218 TestTypedefsV8Internal::testInterfaceOrTestInterfaceEmptyMethodMethod(info); |
219 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 219 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
220 } | 220 } |
221 | 221 |
222 static void arrayOfStringsMethodArrayOfStringsArgMethod(const v8::FunctionCallba
ckInfo<v8::Value>& info) | 222 static void arrayOfStringsMethodArrayOfStringsArgMethod(const v8::FunctionCallba
ckInfo<v8::Value>& info) |
223 { | 223 { |
224 if (UNLIKELY(info.Length() < 1)) { | 224 if (UNLIKELY(info.Length() < 1)) { |
225 throwMinimumArityTypeErrorForMethod("arrayOfStringsMethodArrayOfStringsA
rg", "TestTypedefs", 1, info.Length(), info.GetIsolate()); | 225 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("a
rrayOfStringsMethodArrayOfStringsArg", "TestTypedefs", 1, info.Length(), info.Ge
tIsolate()), info.GetIsolate()); |
226 return; | 226 return; |
227 } | 227 } |
228 TestTypedefs* impl = V8TestTypedefs::toNative(info.Holder()); | 228 TestTypedefs* impl = V8TestTypedefs::toNative(info.Holder()); |
229 Vector<String> arrayOfStringsArg; | 229 Vector<String> arrayOfStringsArg; |
230 { | 230 { |
231 v8::TryCatch block; | 231 v8::TryCatch block; |
232 V8RethrowTryCatchScope rethrow(block); | 232 V8RethrowTryCatchScope rethrow(block); |
233 TONATIVE_VOID_INTERNAL(arrayOfStringsArg, toNativeArray<String>(info[0],
1, info.GetIsolate())); | 233 TONATIVE_VOID_INTERNAL(arrayOfStringsArg, toNativeArray<String>(info[0],
1, info.GetIsolate())); |
234 } | 234 } |
235 v8SetReturnValue(info, v8Array(impl->arrayOfStringsMethodArrayOfStringsArg(a
rrayOfStringsArg), info.Holder(), info.GetIsolate())); | 235 v8SetReturnValue(info, v8Array(impl->arrayOfStringsMethodArrayOfStringsArg(a
rrayOfStringsArg), info.Holder(), info.GetIsolate())); |
236 } | 236 } |
237 | 237 |
238 static void arrayOfStringsMethodArrayOfStringsArgMethodCallback(const v8::Functi
onCallbackInfo<v8::Value>& info) | 238 static void arrayOfStringsMethodArrayOfStringsArgMethodCallback(const v8::Functi
onCallbackInfo<v8::Value>& info) |
239 { | 239 { |
240 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 240 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
241 TestTypedefsV8Internal::arrayOfStringsMethodArrayOfStringsArgMethod(info); | 241 TestTypedefsV8Internal::arrayOfStringsMethodArrayOfStringsArgMethod(info); |
242 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 242 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
243 } | 243 } |
244 | 244 |
245 static void stringArrayMethodStringArrayArgMethod(const v8::FunctionCallbackInfo
<v8::Value>& info) | 245 static void stringArrayMethodStringArrayArgMethod(const v8::FunctionCallbackInfo
<v8::Value>& info) |
246 { | 246 { |
247 if (UNLIKELY(info.Length() < 1)) { | 247 if (UNLIKELY(info.Length() < 1)) { |
248 throwMinimumArityTypeErrorForMethod("stringArrayMethodStringArrayArg", "
TestTypedefs", 1, info.Length(), info.GetIsolate()); | 248 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("s
tringArrayMethodStringArrayArg", "TestTypedefs", 1, info.Length(), info.GetIsola
te()), info.GetIsolate()); |
249 return; | 249 return; |
250 } | 250 } |
251 TestTypedefs* impl = V8TestTypedefs::toNative(info.Holder()); | 251 TestTypedefs* impl = V8TestTypedefs::toNative(info.Holder()); |
252 Vector<String> stringArrayArg; | 252 Vector<String> stringArrayArg; |
253 { | 253 { |
254 v8::TryCatch block; | 254 v8::TryCatch block; |
255 V8RethrowTryCatchScope rethrow(block); | 255 V8RethrowTryCatchScope rethrow(block); |
256 TONATIVE_VOID_INTERNAL(stringArrayArg, toNativeArray<String>(info[0], 1,
info.GetIsolate())); | 256 TONATIVE_VOID_INTERNAL(stringArrayArg, toNativeArray<String>(info[0], 1,
info.GetIsolate())); |
257 } | 257 } |
258 v8SetReturnValue(info, v8Array(impl->stringArrayMethodStringArrayArg(stringA
rrayArg), info.Holder(), info.GetIsolate())); | 258 v8SetReturnValue(info, v8Array(impl->stringArrayMethodStringArrayArg(stringA
rrayArg), info.Holder(), info.GetIsolate())); |
259 } | 259 } |
260 | 260 |
261 static void stringArrayMethodStringArrayArgMethodCallback(const v8::FunctionCall
backInfo<v8::Value>& info) | 261 static void stringArrayMethodStringArrayArgMethodCallback(const v8::FunctionCall
backInfo<v8::Value>& info) |
262 { | 262 { |
263 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 263 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
264 TestTypedefsV8Internal::stringArrayMethodStringArrayArgMethod(info); | 264 TestTypedefsV8Internal::stringArrayMethodStringArrayArgMethod(info); |
265 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 265 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
266 } | 266 } |
267 | 267 |
268 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) | 268 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) |
269 { | 269 { |
270 if (UNLIKELY(info.Length() < 1)) { | 270 if (UNLIKELY(info.Length() < 1)) { |
271 throwMinimumArityTypeErrorForConstructor("TestTypedefs", 1, info.Length(
), info.GetIsolate()); | 271 V8ThrowException::throwException(createMinimumArityTypeErrorForConstruct
or("TestTypedefs", 1, info.Length(), info.GetIsolate()), info.GetIsolate()); |
272 return; | 272 return; |
273 } | 273 } |
274 V8StringResource<> stringArg; | 274 V8StringResource<> stringArg; |
275 { | 275 { |
276 TOSTRING_VOID_INTERNAL(stringArg, info[0]); | 276 TOSTRING_VOID_INTERNAL(stringArg, info[0]); |
277 } | 277 } |
278 RefPtr<TestTypedefs> impl = TestTypedefs::create(stringArg); | 278 RefPtr<TestTypedefs> impl = TestTypedefs::create(stringArg); |
279 v8::Handle<v8::Object> wrapper = info.Holder(); | 279 v8::Handle<v8::Object> wrapper = info.Holder(); |
280 V8DOMWrapper::associateObjectWithWrapper<V8TestTypedefs>(impl.release(), &V8
TestTypedefs::wrapperTypeInfo, wrapper, info.GetIsolate(), WrapperConfiguration:
:Independent); | 280 V8DOMWrapper::associateObjectWithWrapper<V8TestTypedefs>(impl.release(), &V8
TestTypedefs::wrapperTypeInfo, wrapper, info.GetIsolate(), WrapperConfiguration:
:Independent); |
281 v8SetReturnValue(info, wrapper); | 281 v8SetReturnValue(info, wrapper); |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
385 fromInternalPointer(internalPointer)->deref(); | 385 fromInternalPointer(internalPointer)->deref(); |
386 } | 386 } |
387 | 387 |
388 template<> | 388 template<> |
389 v8::Handle<v8::Value> toV8NoInline(TestTypedefs* impl, v8::Handle<v8::Object> cr
eationContext, v8::Isolate* isolate) | 389 v8::Handle<v8::Value> toV8NoInline(TestTypedefs* impl, v8::Handle<v8::Object> cr
eationContext, v8::Isolate* isolate) |
390 { | 390 { |
391 return toV8(impl, creationContext, isolate); | 391 return toV8(impl, creationContext, isolate); |
392 } | 392 } |
393 | 393 |
394 } // namespace blink | 394 } // namespace blink |
OLD | NEW |