OLD | NEW |
1 /* | 1 /* |
2 This file is part of the Blink open source project. | 2 This file is part of the Blink open source project. |
3 This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY! | 3 This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY! |
4 | 4 |
5 This library is free software; you can redistribute it and/or | 5 This library is free software; you can redistribute it and/or |
6 modify it under the terms of the GNU Library General Public | 6 modify it under the terms of the GNU Library General Public |
7 License as published by the Free Software Foundation; either | 7 License as published by the Free Software Foundation; either |
8 version 2 of the License, or (at your option) any later version. | 8 version 2 of the License, or (at your option) any later version. |
9 | 9 |
10 This library is distributed in the hope that it will be useful, | 10 This library is distributed in the hope that it will be useful, |
(...skipping 3904 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3915 return; | 3915 return; |
3916 } | 3916 } |
3917 | 3917 |
3918 static void overloadedMethod7Method(const v8::FunctionCallbackInfo<v8::Value>& a
rgs) | 3918 static void overloadedMethod7Method(const v8::FunctionCallbackInfo<v8::Value>& a
rgs) |
3919 { | 3919 { |
3920 if (UNLIKELY(args.Length() < 1)) { | 3920 if (UNLIKELY(args.Length() < 1)) { |
3921 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethod", "T
estObject", ExceptionMessages::notEnoughArguments(1, args.Length())), args.GetIs
olate()); | 3921 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethod", "T
estObject", ExceptionMessages::notEnoughArguments(1, args.Length())), args.GetIs
olate()); |
3922 return; | 3922 return; |
3923 } | 3923 } |
3924 TestObj* imp = V8TestObject::toNative(args.Holder()); | 3924 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 3925 bool arrayArgIsNull = args[0]->IsNull(); |
3925 V8TRYCATCH_VOID(Vector<String>, arrayArg, toNativeArray<String>(args[0], arg
s.GetIsolate())); | 3926 V8TRYCATCH_VOID(Vector<String>, arrayArg, toNativeArray<String>(args[0], arg
s.GetIsolate())); |
3926 imp->overloadedMethod(arrayArg); | 3927 imp->overloadedMethod(arrayArgIsNull ? 0 : &arrayArg); |
3927 | 3928 |
3928 return; | 3929 return; |
3929 } | 3930 } |
3930 | 3931 |
3931 static void overloadedMethod8Method(const v8::FunctionCallbackInfo<v8::Value>& a
rgs) | 3932 static void overloadedMethod8Method(const v8::FunctionCallbackInfo<v8::Value>& a
rgs) |
3932 { | 3933 { |
3933 if (UNLIKELY(args.Length() < 1)) { | 3934 if (UNLIKELY(args.Length() < 1)) { |
3934 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethod", "T
estObject", ExceptionMessages::notEnoughArguments(1, args.Length())), args.GetIs
olate()); | 3935 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethod", "T
estObject", ExceptionMessages::notEnoughArguments(1, args.Length())), args.GetIs
olate()); |
3935 return; | 3936 return; |
3936 } | 3937 } |
(...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4510 return; | 4511 return; |
4511 } | 4512 } |
4512 | 4513 |
4513 static void variadicNodeMethodMethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& args) | 4514 static void variadicNodeMethodMethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& args) |
4514 { | 4515 { |
4515 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 4516 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
4516 TestObjV8Internal::variadicNodeMethodMethod(args); | 4517 TestObjV8Internal::variadicNodeMethodMethod(args); |
4517 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 4518 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
4518 } | 4519 } |
4519 | 4520 |
| 4521 static void methodWithNullableArgumentsMethod(const v8::FunctionCallbackInfo<v8:
:Value>& args) |
| 4522 { |
| 4523 if (UNLIKELY(args.Length() < 3)) { |
| 4524 throwTypeError(ExceptionMessages::failedToExecute("methodWithNullableArg
uments", "TestObject", ExceptionMessages::notEnoughArguments(3, args.Length())),
args.GetIsolate()); |
| 4525 return; |
| 4526 } |
| 4527 TestObj* imp = V8TestObject::toNative(args.Holder()); |
| 4528 bool strIsNull = args[0]->IsNull(); |
| 4529 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strStringResource,
args[0]); |
| 4530 String str = strStringResource; |
| 4531 bool lIsNull = args[1]->IsNull(); |
| 4532 V8TRYCATCH_VOID(int, l, toInt32(args[1])); |
| 4533 V8TRYCATCH_VOID(TestObj*, obj, V8TestObject::HasInstance(args[2], args.GetIs
olate(), worldType(args.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::O
bject>::Cast(args[2])) : 0); |
| 4534 if (UNLIKELY(args.Length() <= 3)) { |
| 4535 imp->methodWithNullableArguments(strIsNull ? 0 : &str, lIsNull ? 0 : &l,
obj); |
| 4536 |
| 4537 return; |
| 4538 } |
| 4539 bool dIsNull = args[3]->IsNull(); |
| 4540 V8TRYCATCH_VOID(double, d, static_cast<double>(args[3]->NumberValue())); |
| 4541 imp->methodWithNullableArguments(strIsNull ? 0 : &str, lIsNull ? 0 : &l, obj
, dIsNull ? 0 : &d); |
| 4542 |
| 4543 return; |
| 4544 } |
| 4545 |
| 4546 static void methodWithNullableArgumentsMethodCallback(const v8::FunctionCallback
Info<v8::Value>& args) |
| 4547 { |
| 4548 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 4549 TestObjV8Internal::methodWithNullableArgumentsMethod(args); |
| 4550 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 4551 } |
| 4552 |
4520 static void perWorldMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& args
) | 4553 static void perWorldMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& args
) |
4521 { | 4554 { |
4522 TestObj* imp = V8TestObject::toNative(args.Holder()); | 4555 TestObj* imp = V8TestObject::toNative(args.Holder()); |
4523 imp->perWorldMethod(); | 4556 imp->perWorldMethod(); |
4524 | 4557 |
4525 return; | 4558 return; |
4526 } | 4559 } |
4527 | 4560 |
4528 static void perWorldMethodMethodForMainWorld(const v8::FunctionCallbackInfo<v8::
Value>& args) | 4561 static void perWorldMethodMethodForMainWorld(const v8::FunctionCallbackInfo<v8::
Value>& args) |
4529 { | 4562 { |
(...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5172 {"classMethodWithClamp", TestObjV8Internal::classMethodWithClampMethodCallba
ck, 0, 2}, | 5205 {"classMethodWithClamp", TestObjV8Internal::classMethodWithClampMethodCallba
ck, 0, 2}, |
5173 {"methodWithUnsignedLongSequence", TestObjV8Internal::methodWithUnsignedLong
SequenceMethodCallback, 0, 1}, | 5206 {"methodWithUnsignedLongSequence", TestObjV8Internal::methodWithUnsignedLong
SequenceMethodCallback, 0, 1}, |
5174 {"stringArrayFunction", TestObjV8Internal::stringArrayFunctionMethodCallback
, 0, 1}, | 5207 {"stringArrayFunction", TestObjV8Internal::stringArrayFunctionMethodCallback
, 0, 1}, |
5175 {"getSVGDocument", TestObjV8Internal::getSVGDocumentMethodCallback, 0, 0}, | 5208 {"getSVGDocument", TestObjV8Internal::getSVGDocumentMethodCallback, 0, 0}, |
5176 {"mutablePointFunction", TestObjV8Internal::mutablePointFunctionMethodCallba
ck, 0, 0}, | 5209 {"mutablePointFunction", TestObjV8Internal::mutablePointFunctionMethodCallba
ck, 0, 0}, |
5177 {"immutablePointFunction", TestObjV8Internal::immutablePointFunctionMethodCa
llback, 0, 0}, | 5210 {"immutablePointFunction", TestObjV8Internal::immutablePointFunctionMethodCa
llback, 0, 0}, |
5178 {"orange", TestObjV8Internal::orangeMethodCallback, 0, 0}, | 5211 {"orange", TestObjV8Internal::orangeMethodCallback, 0, 0}, |
5179 {"strictFunction", TestObjV8Internal::strictFunctionMethodCallback, 0, 3}, | 5212 {"strictFunction", TestObjV8Internal::strictFunctionMethodCallback, 0, 3}, |
5180 {"variadicStringMethod", TestObjV8Internal::variadicStringMethodMethodCallba
ck, 0, 2}, | 5213 {"variadicStringMethod", TestObjV8Internal::variadicStringMethodMethodCallba
ck, 0, 2}, |
5181 {"variadicDoubleMethod", TestObjV8Internal::variadicDoubleMethodMethodCallba
ck, 0, 2}, | 5214 {"variadicDoubleMethod", TestObjV8Internal::variadicDoubleMethodMethodCallba
ck, 0, 2}, |
| 5215 {"methodWithNullableArguments", TestObjV8Internal::methodWithNullableArgumen
tsMethodCallback, 0, 3}, |
5182 {"perWorldMethod", TestObjV8Internal::perWorldMethodMethodCallback, TestObjV
8Internal::perWorldMethodMethodCallbackForMainWorld, 0}, | 5216 {"perWorldMethod", TestObjV8Internal::perWorldMethodMethodCallback, TestObjV
8Internal::perWorldMethodMethodCallbackForMainWorld, 0}, |
5183 {"overloadedPerWorldMethod", TestObjV8Internal::overloadedPerWorldMethodMeth
odCallback, TestObjV8Internal::overloadedPerWorldMethodMethodCallbackForMainWorl
d, 1}, | 5217 {"overloadedPerWorldMethod", TestObjV8Internal::overloadedPerWorldMethodMeth
odCallback, TestObjV8Internal::overloadedPerWorldMethodMethodCallbackForMainWorl
d, 1}, |
5184 {"activityLoggedMethod1", TestObjV8Internal::activityLoggedMethod1MethodCall
back, 0, 1}, | 5218 {"activityLoggedMethod1", TestObjV8Internal::activityLoggedMethod1MethodCall
back, 0, 1}, |
5185 {"activityLoggedMethod2", TestObjV8Internal::activityLoggedMethod2MethodCall
back, TestObjV8Internal::activityLoggedMethod2MethodCallbackForMainWorld, 1}, | 5219 {"activityLoggedMethod2", TestObjV8Internal::activityLoggedMethod2MethodCall
back, TestObjV8Internal::activityLoggedMethod2MethodCallbackForMainWorld, 1}, |
5186 {"activityLoggedInIsolatedWorldMethod", TestObjV8Internal::activityLoggedInI
solatedWorldMethodMethodCallback, TestObjV8Internal::activityLoggedInIsolatedWor
ldMethodMethodCallbackForMainWorld, 1}, | 5220 {"activityLoggedInIsolatedWorldMethod", TestObjV8Internal::activityLoggedInI
solatedWorldMethodMethodCallback, TestObjV8Internal::activityLoggedInIsolatedWor
ldMethodMethodCallbackForMainWorld, 1}, |
5187 {"overloadedActivityLoggedMethod", TestObjV8Internal::overloadedActivityLogg
edMethodMethodCallback, TestObjV8Internal::overloadedActivityLoggedMethodMethodC
allbackForMainWorld, 1}, | 5221 {"overloadedActivityLoggedMethod", TestObjV8Internal::overloadedActivityLogg
edMethodMethodCallback, TestObjV8Internal::overloadedActivityLoggedMethodMethodC
allbackForMainWorld, 1}, |
5188 {"deprecatedMethod", TestObjV8Internal::deprecatedMethodMethodCallback, 0, 0
}, | 5222 {"deprecatedMethod", TestObjV8Internal::deprecatedMethodMethodCallback, 0, 0
}, |
5189 }; | 5223 }; |
5190 | 5224 |
5191 void V8TestObject::constructorCallback(const v8::FunctionCallbackInfo<v8::Value>
& args) | 5225 void V8TestObject::constructorCallback(const v8::FunctionCallbackInfo<v8::Value>
& args) |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5385 V8DOMWrapper::associateObjectWithWrapper<V8TestObject>(impl, &info, wrapper,
isolate, WrapperConfiguration::Independent); | 5419 V8DOMWrapper::associateObjectWithWrapper<V8TestObject>(impl, &info, wrapper,
isolate, WrapperConfiguration::Independent); |
5386 return wrapper; | 5420 return wrapper; |
5387 } | 5421 } |
5388 | 5422 |
5389 void V8TestObject::derefObject(void* object) | 5423 void V8TestObject::derefObject(void* object) |
5390 { | 5424 { |
5391 fromInternalPointer(object)->deref(); | 5425 fromInternalPointer(object)->deref(); |
5392 } | 5426 } |
5393 | 5427 |
5394 } // namespace WebCore | 5428 } // namespace WebCore |
OLD | NEW |