| 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 "RuntimeEnabledFeatures.h" | 10 #include "RuntimeEnabledFeatures.h" |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 { | 96 { |
| 97 TestTypedefsV8Internal::TestTypedefsReplaceableAttributeSetter(name, v8Value
, info); | 97 TestTypedefsV8Internal::TestTypedefsReplaceableAttributeSetter(name, v8Value
, info); |
| 98 } | 98 } |
| 99 | 99 |
| 100 static void voidMethodArrayOfLongsArgMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 100 static void voidMethodArrayOfLongsArgMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
| 101 { | 101 { |
| 102 TestTypedefs* impl = V8TestTypedefs::toNative(info.Holder()); | 102 TestTypedefs* impl = V8TestTypedefs::toNative(info.Holder()); |
| 103 Vector<int> arrayOfLongsArg; | 103 Vector<int> arrayOfLongsArg; |
| 104 { | 104 { |
| 105 v8::TryCatch block; | 105 v8::TryCatch block; |
| 106 V8RethrowTryCatchScope rethrow(block); |
| 106 if (UNLIKELY(info.Length() <= 0)) { | 107 if (UNLIKELY(info.Length() <= 0)) { |
| 107 impl->voidMethodArrayOfLongsArg(); | 108 impl->voidMethodArrayOfLongsArg(); |
| 108 return; | 109 return; |
| 109 } | 110 } |
| 110 TONATIVE_VOID_INTERNAL(arrayOfLongsArg, toNativeArray<int>(info[0], 1, i
nfo.GetIsolate())); | 111 TONATIVE_VOID_INTERNAL(arrayOfLongsArg, toNativeArray<int>(info[0], 1, i
nfo.GetIsolate())); |
| 111 } | 112 } |
| 112 impl->voidMethodArrayOfLongsArg(arrayOfLongsArg); | 113 impl->voidMethodArrayOfLongsArg(arrayOfLongsArg); |
| 113 } | 114 } |
| 114 | 115 |
| 115 static void voidMethodArrayOfLongsArgMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) | 116 static void voidMethodArrayOfLongsArgMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) |
| 116 { | 117 { |
| 117 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 118 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 118 TestTypedefsV8Internal::voidMethodArrayOfLongsArgMethod(info); | 119 TestTypedefsV8Internal::voidMethodArrayOfLongsArgMethod(info); |
| 119 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 120 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 120 } | 121 } |
| 121 | 122 |
| 122 static void voidMethodFloatArgStringArgMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) | 123 static void voidMethodFloatArgStringArgMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) |
| 123 { | 124 { |
| 124 if (UNLIKELY(info.Length() < 2)) { | 125 if (UNLIKELY(info.Length() < 2)) { |
| 125 throwMinimumArityTypeErrorForMethod("voidMethodFloatArgStringArg", "Test
Typedefs", 2, info.Length(), info.GetIsolate()); | 126 throwMinimumArityTypeErrorForMethod("voidMethodFloatArgStringArg", "Test
Typedefs", 2, info.Length(), info.GetIsolate()); |
| 126 return; | 127 return; |
| 127 } | 128 } |
| 128 TestTypedefs* impl = V8TestTypedefs::toNative(info.Holder()); | 129 TestTypedefs* impl = V8TestTypedefs::toNative(info.Holder()); |
| 129 float floatArg; | 130 float floatArg; |
| 130 V8StringResource<> stringArg; | 131 V8StringResource<> stringArg; |
| 131 { | 132 { |
| 132 v8::TryCatch block; | 133 v8::TryCatch block; |
| 134 V8RethrowTryCatchScope rethrow(block); |
| 133 TONATIVE_VOID_INTERNAL(floatArg, static_cast<float>(info[0]->NumberValue
())); | 135 TONATIVE_VOID_INTERNAL(floatArg, static_cast<float>(info[0]->NumberValue
())); |
| 134 TOSTRING_VOID_INTERNAL(stringArg, info[1]); | 136 TOSTRING_VOID_INTERNAL(stringArg, info[1]); |
| 135 } | 137 } |
| 136 impl->voidMethodFloatArgStringArg(floatArg, stringArg); | 138 impl->voidMethodFloatArgStringArg(floatArg, stringArg); |
| 137 } | 139 } |
| 138 | 140 |
| 139 static void voidMethodFloatArgStringArgMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) | 141 static void voidMethodFloatArgStringArgMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) |
| 140 { | 142 { |
| 141 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 143 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 142 TestTypedefsV8Internal::voidMethodFloatArgStringArgMethod(info); | 144 TestTypedefsV8Internal::voidMethodFloatArgStringArgMethod(info); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 171 static void uLongLongMethodTestInterfaceEmptyTypeSequenceArgMethod(const v8::Fun
ctionCallbackInfo<v8::Value>& info) | 173 static void uLongLongMethodTestInterfaceEmptyTypeSequenceArgMethod(const v8::Fun
ctionCallbackInfo<v8::Value>& info) |
| 172 { | 174 { |
| 173 if (UNLIKELY(info.Length() < 1)) { | 175 if (UNLIKELY(info.Length() < 1)) { |
| 174 throwMinimumArityTypeErrorForMethod("uLongLongMethodTestInterfaceEmptyTy
peSequenceArg", "TestTypedefs", 1, info.Length(), info.GetIsolate()); | 176 throwMinimumArityTypeErrorForMethod("uLongLongMethodTestInterfaceEmptyTy
peSequenceArg", "TestTypedefs", 1, info.Length(), info.GetIsolate()); |
| 175 return; | 177 return; |
| 176 } | 178 } |
| 177 TestTypedefs* impl = V8TestTypedefs::toNative(info.Holder()); | 179 TestTypedefs* impl = V8TestTypedefs::toNative(info.Holder()); |
| 178 Vector<RefPtr<TestInterfaceEmpty> > testInterfaceEmptyTypeSequenceArg; | 180 Vector<RefPtr<TestInterfaceEmpty> > testInterfaceEmptyTypeSequenceArg; |
| 179 { | 181 { |
| 180 v8::TryCatch block; | 182 v8::TryCatch block; |
| 183 V8RethrowTryCatchScope rethrow(block); |
| 181 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()))
); |
| 182 } | 185 } |
| 183 v8SetReturnValue(info, static_cast<double>(impl->uLongLongMethodTestInterfac
eEmptyTypeSequenceArg(testInterfaceEmptyTypeSequenceArg))); | 186 v8SetReturnValue(info, static_cast<double>(impl->uLongLongMethodTestInterfac
eEmptyTypeSequenceArg(testInterfaceEmptyTypeSequenceArg))); |
| 184 } | 187 } |
| 185 | 188 |
| 186 static void uLongLongMethodTestInterfaceEmptyTypeSequenceArgMethodCallback(const
v8::FunctionCallbackInfo<v8::Value>& info) | 189 static void uLongLongMethodTestInterfaceEmptyTypeSequenceArgMethodCallback(const
v8::FunctionCallbackInfo<v8::Value>& info) |
| 187 { | 190 { |
| 188 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 191 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 189 TestTypedefsV8Internal::uLongLongMethodTestInterfaceEmptyTypeSequenceArgMeth
od(info); | 192 TestTypedefsV8Internal::uLongLongMethodTestInterfaceEmptyTypeSequenceArgMeth
od(info); |
| 190 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 193 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 219 static void arrayOfStringsMethodArrayOfStringsArgMethod(const v8::FunctionCallba
ckInfo<v8::Value>& info) | 222 static void arrayOfStringsMethodArrayOfStringsArgMethod(const v8::FunctionCallba
ckInfo<v8::Value>& info) |
| 220 { | 223 { |
| 221 if (UNLIKELY(info.Length() < 1)) { | 224 if (UNLIKELY(info.Length() < 1)) { |
| 222 throwMinimumArityTypeErrorForMethod("arrayOfStringsMethodArrayOfStringsA
rg", "TestTypedefs", 1, info.Length(), info.GetIsolate()); | 225 throwMinimumArityTypeErrorForMethod("arrayOfStringsMethodArrayOfStringsA
rg", "TestTypedefs", 1, info.Length(), info.GetIsolate()); |
| 223 return; | 226 return; |
| 224 } | 227 } |
| 225 TestTypedefs* impl = V8TestTypedefs::toNative(info.Holder()); | 228 TestTypedefs* impl = V8TestTypedefs::toNative(info.Holder()); |
| 226 Vector<String> arrayOfStringsArg; | 229 Vector<String> arrayOfStringsArg; |
| 227 { | 230 { |
| 228 v8::TryCatch block; | 231 v8::TryCatch block; |
| 232 V8RethrowTryCatchScope rethrow(block); |
| 229 TONATIVE_VOID_INTERNAL(arrayOfStringsArg, toNativeArray<String>(info[0],
1, info.GetIsolate())); | 233 TONATIVE_VOID_INTERNAL(arrayOfStringsArg, toNativeArray<String>(info[0],
1, info.GetIsolate())); |
| 230 } | 234 } |
| 231 v8SetReturnValue(info, v8Array(impl->arrayOfStringsMethodArrayOfStringsArg(a
rrayOfStringsArg), info.Holder(), info.GetIsolate())); | 235 v8SetReturnValue(info, v8Array(impl->arrayOfStringsMethodArrayOfStringsArg(a
rrayOfStringsArg), info.Holder(), info.GetIsolate())); |
| 232 } | 236 } |
| 233 | 237 |
| 234 static void arrayOfStringsMethodArrayOfStringsArgMethodCallback(const v8::Functi
onCallbackInfo<v8::Value>& info) | 238 static void arrayOfStringsMethodArrayOfStringsArgMethodCallback(const v8::Functi
onCallbackInfo<v8::Value>& info) |
| 235 { | 239 { |
| 236 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 240 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 237 TestTypedefsV8Internal::arrayOfStringsMethodArrayOfStringsArgMethod(info); | 241 TestTypedefsV8Internal::arrayOfStringsMethodArrayOfStringsArgMethod(info); |
| 238 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 242 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 239 } | 243 } |
| 240 | 244 |
| 241 static void stringArrayMethodStringArrayArgMethod(const v8::FunctionCallbackInfo
<v8::Value>& info) | 245 static void stringArrayMethodStringArrayArgMethod(const v8::FunctionCallbackInfo
<v8::Value>& info) |
| 242 { | 246 { |
| 243 if (UNLIKELY(info.Length() < 1)) { | 247 if (UNLIKELY(info.Length() < 1)) { |
| 244 throwMinimumArityTypeErrorForMethod("stringArrayMethodStringArrayArg", "
TestTypedefs", 1, info.Length(), info.GetIsolate()); | 248 throwMinimumArityTypeErrorForMethod("stringArrayMethodStringArrayArg", "
TestTypedefs", 1, info.Length(), info.GetIsolate()); |
| 245 return; | 249 return; |
| 246 } | 250 } |
| 247 TestTypedefs* impl = V8TestTypedefs::toNative(info.Holder()); | 251 TestTypedefs* impl = V8TestTypedefs::toNative(info.Holder()); |
| 248 Vector<String> stringArrayArg; | 252 Vector<String> stringArrayArg; |
| 249 { | 253 { |
| 250 v8::TryCatch block; | 254 v8::TryCatch block; |
| 255 V8RethrowTryCatchScope rethrow(block); |
| 251 TONATIVE_VOID_INTERNAL(stringArrayArg, toNativeArray<String>(info[0], 1,
info.GetIsolate())); | 256 TONATIVE_VOID_INTERNAL(stringArrayArg, toNativeArray<String>(info[0], 1,
info.GetIsolate())); |
| 252 } | 257 } |
| 253 v8SetReturnValue(info, v8Array(impl->stringArrayMethodStringArrayArg(stringA
rrayArg), info.Holder(), info.GetIsolate())); | 258 v8SetReturnValue(info, v8Array(impl->stringArrayMethodStringArrayArg(stringA
rrayArg), info.Holder(), info.GetIsolate())); |
| 254 } | 259 } |
| 255 | 260 |
| 256 static void stringArrayMethodStringArrayArgMethodCallback(const v8::FunctionCall
backInfo<v8::Value>& info) | 261 static void stringArrayMethodStringArrayArgMethodCallback(const v8::FunctionCall
backInfo<v8::Value>& info) |
| 257 { | 262 { |
| 258 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 263 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 259 TestTypedefsV8Internal::stringArrayMethodStringArrayArgMethod(info); | 264 TestTypedefsV8Internal::stringArrayMethodStringArrayArgMethod(info); |
| 260 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 265 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 261 } | 266 } |
| 262 | 267 |
| 263 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) | 268 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 264 { | 269 { |
| 265 v8::Isolate* isolate = info.GetIsolate(); | 270 v8::Isolate* isolate = info.GetIsolate(); |
| 266 if (UNLIKELY(info.Length() < 1)) { | 271 if (UNLIKELY(info.Length() < 1)) { |
| 267 throwMinimumArityTypeErrorForConstructor("TestTypedefs", 1, info.Length(
), info.GetIsolate()); | 272 throwMinimumArityTypeErrorForConstructor("TestTypedefs", 1, info.Length(
), info.GetIsolate()); |
| 268 return; | 273 return; |
| 269 } | 274 } |
| 270 V8StringResource<> stringArg; | 275 V8StringResource<> stringArg; |
| 271 { | 276 { |
| 272 TOSTRING_VOID_INTERNAL_NOTRYCATCH(stringArg, info[0]); | 277 TOSTRING_VOID_INTERNAL(stringArg, info[0]); |
| 273 } | 278 } |
| 274 RefPtr<TestTypedefs> impl = TestTypedefs::create(stringArg); | 279 RefPtr<TestTypedefs> impl = TestTypedefs::create(stringArg); |
| 275 | 280 |
| 276 v8::Handle<v8::Object> wrapper = info.Holder(); | 281 v8::Handle<v8::Object> wrapper = info.Holder(); |
| 277 V8DOMWrapper::associateObjectWithWrapper<V8TestTypedefs>(impl.release(), &V8
TestTypedefs::wrapperTypeInfo, wrapper, isolate, WrapperConfiguration::Independe
nt); | 282 V8DOMWrapper::associateObjectWithWrapper<V8TestTypedefs>(impl.release(), &V8
TestTypedefs::wrapperTypeInfo, wrapper, isolate, WrapperConfiguration::Independe
nt); |
| 278 v8SetReturnValue(info, wrapper); | 283 v8SetReturnValue(info, wrapper); |
| 279 } | 284 } |
| 280 | 285 |
| 281 } // namespace TestTypedefsV8Internal | 286 } // namespace TestTypedefsV8Internal |
| 282 | 287 |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 fromInternalPointer(object)->deref(); | 389 fromInternalPointer(object)->deref(); |
| 385 } | 390 } |
| 386 | 391 |
| 387 template<> | 392 template<> |
| 388 v8::Handle<v8::Value> toV8NoInline(TestTypedefs* impl, v8::Handle<v8::Object> cr
eationContext, v8::Isolate* isolate) | 393 v8::Handle<v8::Value> toV8NoInline(TestTypedefs* impl, v8::Handle<v8::Object> cr
eationContext, v8::Isolate* isolate) |
| 389 { | 394 { |
| 390 return toV8(impl, creationContext, isolate); | 395 return toV8(impl, creationContext, isolate); |
| 391 } | 396 } |
| 392 | 397 |
| 393 } // namespace WebCore | 398 } // namespace WebCore |
| OLD | NEW |