| Index: Source/bindings/tests/results/core/V8TestObject.cpp
|
| diff --git a/Source/bindings/tests/results/core/V8TestObject.cpp b/Source/bindings/tests/results/core/V8TestObject.cpp
|
| index 1dc608d512367616408aee0d7039fcf7e5617acf..82a7db37fa0b47b998a72bdeab1c88ca3b3f1158 100644
|
| --- a/Source/bindings/tests/results/core/V8TestObject.cpp
|
| +++ b/Source/bindings/tests/results/core/V8TestObject.cpp
|
| @@ -9660,7 +9660,7 @@ static void typeCheckingInterfaceVoidMethodTestInterfaceEmptyArgMethod(const v8:
|
| V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute("typeCheckingInterfaceVoidMethodTestInterfaceEmptyArg", "TestObject", "parameter 1 is not of type 'TestInterfaceEmpty'."), info.GetIsolate());
|
| return;
|
| }
|
| - testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.GetIsolate(), info[0]);
|
| + testInterfaceEmptyArg = V8TestInterfaceEmpty::toImpl(v8::Handle<v8::Object>::Cast(info[0]));
|
| }
|
| impl->typeCheckingInterfaceVoidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg);
|
| }
|
| @@ -9999,6 +9999,103 @@ static void methodImplementedInCPPForPrivateScriptOnlyMethodCallback(const v8::F
|
| TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
|
| }
|
|
|
| +static void useToImpl4ArgumentsCheckingIfPossibleWithOptionalArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| +{
|
| + if (UNLIKELY(info.Length() < 1)) {
|
| + V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("useToImpl4ArgumentsCheckingIfPossibleWithOptionalArg", "TestObject", 1, info.Length(), info.GetIsolate()), info.GetIsolate());
|
| + return;
|
| + }
|
| + TestObject* impl = V8TestObject::toImpl(info.Holder());
|
| + Node* node1;
|
| + Node* node2;
|
| + {
|
| + if (info.Length() > 0 && !V8Node::hasInstance(info[0], info.GetIsolate())) {
|
| + V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute("useToImpl4ArgumentsCheckingIfPossibleWithOptionalArg", "TestObject", "parameter 1 is not of type 'Node'."), info.GetIsolate());
|
| + return;
|
| + }
|
| + node1 = V8Node::toImpl(v8::Handle<v8::Object>::Cast(info[0]));
|
| + if (UNLIKELY(info.Length() <= 1)) {
|
| + impl->useToImpl4ArgumentsCheckingIfPossibleWithOptionalArg(node1);
|
| + return;
|
| + }
|
| + if (info.Length() > 1 && !V8Node::hasInstance(info[1], info.GetIsolate())) {
|
| + V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute("useToImpl4ArgumentsCheckingIfPossibleWithOptionalArg", "TestObject", "parameter 2 is not of type 'Node'."), info.GetIsolate());
|
| + return;
|
| + }
|
| + node2 = V8Node::toImpl(v8::Handle<v8::Object>::Cast(info[1]));
|
| + }
|
| + impl->useToImpl4ArgumentsCheckingIfPossibleWithOptionalArg(node1, node2);
|
| +}
|
| +
|
| +static void useToImpl4ArgumentsCheckingIfPossibleWithOptionalArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| +{
|
| + TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
|
| + TestObjectV8Internal::useToImpl4ArgumentsCheckingIfPossibleWithOptionalArgMethod(info);
|
| + TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
|
| +}
|
| +
|
| +static void useToImpl4ArgumentsCheckingIfPossibleWithNullableArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| +{
|
| + if (UNLIKELY(info.Length() < 2)) {
|
| + V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("useToImpl4ArgumentsCheckingIfPossibleWithNullableArg", "TestObject", 2, info.Length(), info.GetIsolate()), info.GetIsolate());
|
| + return;
|
| + }
|
| + TestObject* impl = V8TestObject::toImpl(info.Holder());
|
| + Node* node1;
|
| + Node* node2;
|
| + {
|
| + if (info.Length() > 0 && !V8Node::hasInstance(info[0], info.GetIsolate())) {
|
| + V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute("useToImpl4ArgumentsCheckingIfPossibleWithNullableArg", "TestObject", "parameter 1 is not of type 'Node'."), info.GetIsolate());
|
| + return;
|
| + }
|
| + node1 = V8Node::toImpl(v8::Handle<v8::Object>::Cast(info[0]));
|
| + if (info.Length() > 1 && !isUndefinedOrNull(info[1]) && !V8Node::hasInstance(info[1], info.GetIsolate())) {
|
| + V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute("useToImpl4ArgumentsCheckingIfPossibleWithNullableArg", "TestObject", "parameter 2 is not of type 'Node'."), info.GetIsolate());
|
| + return;
|
| + }
|
| + node2 = V8Node::toImplWithTypeCheck(info.GetIsolate(), info[1]);
|
| + }
|
| + impl->useToImpl4ArgumentsCheckingIfPossibleWithNullableArg(node1, node2);
|
| +}
|
| +
|
| +static void useToImpl4ArgumentsCheckingIfPossibleWithNullableArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| +{
|
| + TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
|
| + TestObjectV8Internal::useToImpl4ArgumentsCheckingIfPossibleWithNullableArgMethod(info);
|
| + TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
|
| +}
|
| +
|
| +static void useToImpl4ArgumentsCheckingIfPossibleWithUndefinedArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| +{
|
| + if (UNLIKELY(info.Length() < 1)) {
|
| + V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("useToImpl4ArgumentsCheckingIfPossibleWithUndefinedArg", "TestObject", 1, info.Length(), info.GetIsolate()), info.GetIsolate());
|
| + return;
|
| + }
|
| + TestObject* impl = V8TestObject::toImpl(info.Holder());
|
| + Node* node1;
|
| + Node* node2;
|
| + {
|
| + if (info.Length() > 0 && !V8Node::hasInstance(info[0], info.GetIsolate())) {
|
| + V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute("useToImpl4ArgumentsCheckingIfPossibleWithUndefinedArg", "TestObject", "parameter 1 is not of type 'Node'."), info.GetIsolate());
|
| + return;
|
| + }
|
| + node1 = V8Node::toImpl(v8::Handle<v8::Object>::Cast(info[0]));
|
| + if (info.Length() > 1 && !V8Node::hasInstance(info[1], info.GetIsolate())) {
|
| + V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute("useToImpl4ArgumentsCheckingIfPossibleWithUndefinedArg", "TestObject", "parameter 2 is not of type 'Node'."), info.GetIsolate());
|
| + return;
|
| + }
|
| + node2 = V8Node::toImplWithTypeCheck(info.GetIsolate(), info[1]);
|
| + }
|
| + impl->useToImpl4ArgumentsCheckingIfPossibleWithUndefinedArg(node1, node2);
|
| +}
|
| +
|
| +static void useToImpl4ArgumentsCheckingIfPossibleWithUndefinedArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| +{
|
| + TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
|
| + TestObjectV8Internal::useToImpl4ArgumentsCheckingIfPossibleWithUndefinedArgMethod(info);
|
| + TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
|
| +}
|
| +
|
| static void toStringMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| {
|
| TestObject* impl = V8TestObject::toImpl(info.Holder());
|
| @@ -10384,6 +10481,9 @@ static const V8DOMConfiguration::MethodConfiguration V8TestObjectMethods[] = {
|
| {"nodeMethodWithNodeArgumentImplementedInPrivateScript", TestObjectV8Internal::nodeMethodWithNodeArgumentImplementedInPrivateScriptMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts},
|
| {"nodeMethodWithVariousArgumentsImplementedInPrivateScript", TestObjectV8Internal::nodeMethodWithVariousArgumentsImplementedInPrivateScriptMethodCallback, 0, 5, V8DOMConfiguration::ExposedToAllScripts},
|
| {"methodImplementedInCPPForPrivateScriptOnly", TestObjectV8Internal::methodImplementedInCPPForPrivateScriptOnlyMethodCallback, 0, 2, V8DOMConfiguration::OnlyExposedToPrivateScript},
|
| + {"useToImpl4ArgumentsCheckingIfPossibleWithOptionalArg", TestObjectV8Internal::useToImpl4ArgumentsCheckingIfPossibleWithOptionalArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts},
|
| + {"useToImpl4ArgumentsCheckingIfPossibleWithNullableArg", TestObjectV8Internal::useToImpl4ArgumentsCheckingIfPossibleWithNullableArgMethodCallback, 0, 2, V8DOMConfiguration::ExposedToAllScripts},
|
| + {"useToImpl4ArgumentsCheckingIfPossibleWithUndefinedArg", TestObjectV8Internal::useToImpl4ArgumentsCheckingIfPossibleWithUndefinedArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts},
|
| {"toString", TestObjectV8Internal::toStringMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts},
|
| };
|
|
|
|
|