Index: Source/bindings/tests/results/V8TestObjectPython.cpp |
diff --git a/Source/bindings/tests/results/V8TestObjectPython.cpp b/Source/bindings/tests/results/V8TestObjectPython.cpp |
index 8fb5731baedbb53206bb14f704f7db76d97860c9..6d2094dfd1947540a92f2bdbe4904b4dd85a3d02 100644 |
--- a/Source/bindings/tests/results/V8TestObjectPython.cpp |
+++ b/Source/bindings/tests/results/V8TestObjectPython.cpp |
@@ -4765,10 +4765,10 @@ static void voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArgMethodCa |
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
} |
-static void voidMethodClampUnsignedShortArgClampUnsignedLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& args) |
+static void voidMethodClampUnsignedShortArgMethod(const v8::FunctionCallbackInfo<v8::Value>& args) |
{ |
- if (UNLIKELY(args.Length() < 2)) { |
- throwTypeError(ExceptionMessages::failedToExecute("voidMethodClampUnsignedShortArgClampUnsignedLongArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(2, args.Length())), args.GetIsolate()); |
+ if (UNLIKELY(args.Length() < 1)) { |
+ throwTypeError(ExceptionMessages::failedToExecute("voidMethodClampUnsignedShortArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, args.Length())), args.GetIsolate()); |
return; |
} |
TestObjectPython* imp = V8TestObjectPython::toNative(args.Holder()); |
@@ -4776,17 +4776,90 @@ static void voidMethodClampUnsignedShortArgClampUnsignedLongArgMethod(const v8:: |
V8TRYCATCH_VOID(double, clampUnsignedShortArgNativeValue, args[0]->NumberValue()); |
if (!std::isnan(clampUnsignedShortArgNativeValue)) |
clampUnsignedShortArg = clampTo<unsigned short>(clampUnsignedShortArgNativeValue); |
+ imp->voidMethodClampUnsignedShortArg(clampUnsignedShortArg); |
+} |
+ |
+static void voidMethodClampUnsignedShortArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args) |
+{ |
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
+ TestObjectPythonV8Internal::voidMethodClampUnsignedShortArgMethod(args); |
+ TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
+} |
+ |
+static void voidMethodClampUnsignedLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& args) |
+{ |
+ if (UNLIKELY(args.Length() < 1)) { |
+ throwTypeError(ExceptionMessages::failedToExecute("voidMethodClampUnsignedLongArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, args.Length())), args.GetIsolate()); |
+ return; |
+ } |
+ TestObjectPython* imp = V8TestObjectPython::toNative(args.Holder()); |
unsigned long clampUnsignedLongArg = 0; |
- V8TRYCATCH_VOID(double, clampUnsignedLongArgNativeValue, args[1]->NumberValue()); |
+ V8TRYCATCH_VOID(double, clampUnsignedLongArgNativeValue, args[0]->NumberValue()); |
if (!std::isnan(clampUnsignedLongArgNativeValue)) |
clampUnsignedLongArg = clampTo<unsigned long>(clampUnsignedLongArgNativeValue); |
- imp->voidMethodClampUnsignedShortArgClampUnsignedLongArg(clampUnsignedShortArg, clampUnsignedLongArg); |
+ imp->voidMethodClampUnsignedLongArg(clampUnsignedLongArg); |
} |
-static void voidMethodClampUnsignedShortArgClampUnsignedLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args) |
+static void voidMethodClampUnsignedLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args) |
{ |
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
- TestObjectPythonV8Internal::voidMethodClampUnsignedShortArgClampUnsignedLongArgMethod(args); |
+ TestObjectPythonV8Internal::voidMethodClampUnsignedLongArgMethod(args); |
+ TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
+} |
+ |
+static void voidMethodDefaultUndefinedTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& args) |
+{ |
+ TestObjectPython* imp = V8TestObjectPython::toNative(args.Holder()); |
+ V8TRYCATCH_VOID(TestInterfaceEmpty*, defaultUndefinedTestInterfaceEmptyArg, V8TestInterfaceEmpty::HasInstance(args[0], args.GetIsolate(), worldType(args.GetIsolate())) ? V8TestInterfaceEmpty::toNative(v8::Handle<v8::Object>::Cast(args[0])) : 0); |
+ imp->voidMethodDefaultUndefinedTestInterfaceEmptyArg(defaultUndefinedTestInterfaceEmptyArg); |
+} |
+ |
+static void voidMethodDefaultUndefinedTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args) |
+{ |
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
+ TestObjectPythonV8Internal::voidMethodDefaultUndefinedTestInterfaceEmptyArgMethod(args); |
+ TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
+} |
+ |
+static void voidMethodDefaultUndefinedLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& args) |
+{ |
+ TestObjectPython* imp = V8TestObjectPython::toNative(args.Holder()); |
+ V8TRYCATCH_VOID(int, defaultUndefinedLongArg, toInt32(args[0])); |
+ imp->voidMethodDefaultUndefinedLongArg(defaultUndefinedLongArg); |
+} |
+ |
+static void voidMethodDefaultUndefinedLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args) |
+{ |
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
+ TestObjectPythonV8Internal::voidMethodDefaultUndefinedLongArgMethod(args); |
+ TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
+} |
+ |
+static void voidMethodDefaultUndefinedStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& args) |
+{ |
+ TestObjectPython* imp = V8TestObjectPython::toNative(args.Holder()); |
+ V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, defaultUndefinedStringArg, args[0]); |
+ imp->voidMethodDefaultUndefinedStringArg(defaultUndefinedStringArg); |
+} |
+ |
+static void voidMethodDefaultUndefinedStringArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args) |
+{ |
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
+ TestObjectPythonV8Internal::voidMethodDefaultUndefinedStringArgMethod(args); |
+ TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
+} |
+ |
+static void voidMethodDefaultNullStringStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& args) |
+{ |
+ TestObjectPython* imp = V8TestObjectPython::toNative(args.Holder()); |
+ V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, defaultNullStringStringArg, argumentOrNull(args, 0)); |
+ imp->voidMethodDefaultNullStringStringArg(defaultNullStringStringArg); |
+} |
+ |
+static void voidMethodDefaultNullStringStringArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args) |
+{ |
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
+ TestObjectPythonV8Internal::voidMethodDefaultNullStringStringArgMethod(args); |
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
} |
@@ -4986,7 +5059,11 @@ static const V8DOMConfiguration::MethodConfiguration V8TestObjectPythonMethods[] |
{"voidMethodTestInterfaceEmptyArgOptionalLongArg", TestObjectPythonV8Internal::voidMethodTestInterfaceEmptyArgOptionalLongArgMethodCallback, 0, 1}, |
{"voidMethodVariadicStringArg", TestObjectPythonV8Internal::voidMethodVariadicStringArgMethodCallback, 0, 1}, |
{"voidMethodStringArgVariadicStringArg", TestObjectPythonV8Internal::voidMethodStringArgVariadicStringArgMethodCallback, 0, 2}, |
- {"voidMethodClampUnsignedShortArgClampUnsignedLongArg", TestObjectPythonV8Internal::voidMethodClampUnsignedShortArgClampUnsignedLongArgMethodCallback, 0, 2}, |
+ {"voidMethodClampUnsignedShortArg", TestObjectPythonV8Internal::voidMethodClampUnsignedShortArgMethodCallback, 0, 1}, |
+ {"voidMethodClampUnsignedLongArg", TestObjectPythonV8Internal::voidMethodClampUnsignedLongArgMethodCallback, 0, 1}, |
+ {"voidMethodDefaultUndefinedLongArg", TestObjectPythonV8Internal::voidMethodDefaultUndefinedLongArgMethodCallback, 0, 0}, |
+ {"voidMethodDefaultUndefinedStringArg", TestObjectPythonV8Internal::voidMethodDefaultUndefinedStringArgMethodCallback, 0, 0}, |
+ {"voidMethodDefaultNullStringStringArg", TestObjectPythonV8Internal::voidMethodDefaultNullStringStringArgMethodCallback, 0, 0}, |
}; |
static v8::Handle<v8::FunctionTemplate> ConfigureV8TestObjectPythonTemplate(v8::Handle<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType currentWorldType) |
@@ -5116,6 +5193,12 @@ static v8::Handle<v8::FunctionTemplate> ConfigureV8TestObjectPythonTemplate(v8:: |
v8::Handle<v8::FunctionTemplate> voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArgArgv[voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArgArgc] = { V8PerIsolateData::from(isolate)->rawTemplate(&V8TestInterfaceEmpty::wrapperTypeInfo, currentWorldType), V8PerIsolateData::from(isolate)->rawTemplate(&V8TestInterfaceEmpty::wrapperTypeInfo, currentWorldType) }; |
v8::Handle<v8::Signature> voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArgSignature = v8::Signature::New(desc, voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArgArgc, voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArgArgv); |
proto->Set(v8::String::NewSymbol("voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArg"), v8::FunctionTemplate::New(TestObjectPythonV8Internal::voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArgMethodCallback, v8Undefined(), voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArgSignature, 2)); |
+ |
+ // Custom Signature 'voidMethodDefaultUndefinedTestInterfaceEmptyArg' |
+ const int voidMethodDefaultUndefinedTestInterfaceEmptyArgArgc = 1; |
+ v8::Handle<v8::FunctionTemplate> voidMethodDefaultUndefinedTestInterfaceEmptyArgArgv[voidMethodDefaultUndefinedTestInterfaceEmptyArgArgc] = { V8PerIsolateData::from(isolate)->rawTemplate(&V8TestInterfaceEmpty::wrapperTypeInfo, currentWorldType) }; |
+ v8::Handle<v8::Signature> voidMethodDefaultUndefinedTestInterfaceEmptyArgSignature = v8::Signature::New(desc, voidMethodDefaultUndefinedTestInterfaceEmptyArgArgc, voidMethodDefaultUndefinedTestInterfaceEmptyArgArgv); |
+ proto->Set(v8::String::NewSymbol("voidMethodDefaultUndefinedTestInterfaceEmptyArg"), v8::FunctionTemplate::New(TestObjectPythonV8Internal::voidMethodDefaultUndefinedTestInterfaceEmptyArgMethodCallback, v8Undefined(), voidMethodDefaultUndefinedTestInterfaceEmptyArgSignature, 0)); |
desc->SetNativeDataProperty(v8::String::NewSymbol("staticStringAttribute"), TestObjectPythonV8Internal::staticStringAttributeAttributeGetterCallback, TestObjectPythonV8Internal::staticStringAttributeAttributeSetterCallback, v8::External::New(0), static_cast<v8::PropertyAttribute>(v8::None), v8::Handle<v8::AccessorSignature>(), static_cast<v8::AccessControl>(v8::DEFAULT)); |
desc->SetNativeDataProperty(v8::String::NewSymbol("staticLongAttribute"), TestObjectPythonV8Internal::staticLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::staticLongAttributeAttributeSetterCallback, v8::External::New(0), static_cast<v8::PropertyAttribute>(v8::None), v8::Handle<v8::AccessorSignature>(), static_cast<v8::AccessControl>(v8::DEFAULT)); |