| Index: Source/bindings/tests/results/V8TestObject.cpp
|
| diff --git a/Source/bindings/tests/results/V8TestObject.cpp b/Source/bindings/tests/results/V8TestObject.cpp
|
| index b3554334ec03874648e0e44a98d190a6bec6c376..d4d4a5018f71dfc475b323ad95ed3fc265530e25 100644
|
| --- a/Source/bindings/tests/results/V8TestObject.cpp
|
| +++ b/Source/bindings/tests/results/V8TestObject.cpp
|
| @@ -8605,6 +8605,118 @@ static void perWorldBindingsRuntimeEnabledVoidMethodMethodCallbackForMainWorld(c
|
| TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
|
| }
|
|
|
| +static void runtimeEnabledOverloadedVoidMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| +{
|
| + TestObject* impl = V8TestObject::toNative(info.Holder());
|
| + V8StringResource<> stringArg;
|
| + {
|
| + TOSTRING_VOID_INTERNAL(stringArg, info[0]);
|
| + }
|
| + impl->runtimeEnabledOverloadedVoidMethod(stringArg);
|
| +}
|
| +
|
| +static void runtimeEnabledOverloadedVoidMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| +{
|
| + ExceptionState exceptionState(ExceptionState::ExecutionContext, "runtimeEnabledOverloadedVoidMethod", "TestObject", info.Holder(), info.GetIsolate());
|
| + TestObject* impl = V8TestObject::toNative(info.Holder());
|
| + int longArg;
|
| + {
|
| + v8::TryCatch block;
|
| + TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptionState), exceptionState);
|
| + }
|
| + impl->runtimeEnabledOverloadedVoidMethod(longArg);
|
| +}
|
| +
|
| +static void runtimeEnabledOverloadedVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| +{
|
| + v8::Isolate* isolate = info.GetIsolate();
|
| + ExceptionState exceptionState(ExceptionState::ExecutionContext, "runtimeEnabledOverloadedVoidMethod", "TestObject", info.Holder(), isolate);
|
| + switch (std::min(1, info.Length())) {
|
| + case 1:
|
| + if (info[0]->IsNumber()) {
|
| + runtimeEnabledOverloadedVoidMethod2Method(info);
|
| + return;
|
| + }
|
| + if (true) {
|
| + runtimeEnabledOverloadedVoidMethod1Method(info);
|
| + return;
|
| + }
|
| + break;
|
| + default:
|
| + exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length()));
|
| + exceptionState.throwIfNeeded();
|
| + return;
|
| + }
|
| + exceptionState.throwTypeError("No function was found that matched the signature provided.");
|
| + exceptionState.throwIfNeeded();
|
| +}
|
| +
|
| +static void runtimeEnabledOverloadedVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| +{
|
| + TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
|
| + TestObjectV8Internal::runtimeEnabledOverloadedVoidMethodMethod(info);
|
| + TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
|
| +}
|
| +
|
| +static void partiallyRuntimeEnabledOverloadedVoidMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| +{
|
| + TestObject* impl = V8TestObject::toNative(info.Holder());
|
| + V8StringResource<> stringArg;
|
| + {
|
| + TOSTRING_VOID_INTERNAL(stringArg, info[0]);
|
| + }
|
| + impl->partiallyRuntimeEnabledOverloadedVoidMethod(stringArg);
|
| +}
|
| +
|
| +static void partiallyRuntimeEnabledOverloadedVoidMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| +{
|
| + ExceptionState exceptionState(ExceptionState::ExecutionContext, "partiallyRuntimeEnabledOverloadedVoidMethod", "TestObject", info.Holder(), info.GetIsolate());
|
| + TestObject* impl = V8TestObject::toNative(info.Holder());
|
| + int longArg;
|
| + {
|
| + v8::TryCatch block;
|
| + TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptionState), exceptionState);
|
| + }
|
| + impl->partiallyRuntimeEnabledOverloadedVoidMethod(longArg);
|
| +}
|
| +
|
| +static void partiallyRuntimeEnabledOverloadedVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| +{
|
| + v8::Isolate* isolate = info.GetIsolate();
|
| + ExceptionState exceptionState(ExceptionState::ExecutionContext, "partiallyRuntimeEnabledOverloadedVoidMethod", "TestObject", info.Holder(), isolate);
|
| + switch (std::min(1, info.Length())) {
|
| + case 1:
|
| + if (info[0]->IsNumber()) {
|
| + partiallyRuntimeEnabledOverloadedVoidMethod2Method(info);
|
| + return;
|
| + }
|
| + if (RuntimeEnabledFeatures::featureNameEnabled()) {
|
| + if (true) {
|
| + partiallyRuntimeEnabledOverloadedVoidMethod1Method(info);
|
| + return;
|
| + }
|
| + }
|
| + if (true) {
|
| + partiallyRuntimeEnabledOverloadedVoidMethod2Method(info);
|
| + return;
|
| + }
|
| + break;
|
| + default:
|
| + exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length()));
|
| + exceptionState.throwIfNeeded();
|
| + return;
|
| + }
|
| + exceptionState.throwTypeError("No function was found that matched the signature provided.");
|
| + exceptionState.throwIfNeeded();
|
| +}
|
| +
|
| +static void partiallyRuntimeEnabledOverloadedVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| +{
|
| + TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
|
| + TestObjectV8Internal::partiallyRuntimeEnabledOverloadedVoidMethodMethod(info);
|
| + TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
|
| +}
|
| +
|
| static void treatReturnedNullStringAsNullStringMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| {
|
| TestObject* impl = V8TestObject::toNative(info.Holder());
|
| @@ -9263,6 +9375,9 @@ static void configureV8TestObjectTemplate(v8::Handle<v8::FunctionTemplate> funct
|
| if (RuntimeEnabledFeatures::featureNameEnabled())
|
| prototypeTemplate->Set(v8AtomicString(isolate, "perWorldBindingsRuntimeEnabledVoidMethod"), v8::FunctionTemplate::New(isolate, TestObjectV8Internal::perWorldBindingsRuntimeEnabledVoidMethodMethodCallback, v8Undefined(), defaultSignature, 0));
|
| }
|
| + if (RuntimeEnabledFeatures::featureNameEnabled())
|
| + prototypeTemplate->Set(v8AtomicString(isolate, "runtimeEnabledOverloadedVoidMethod"), v8::FunctionTemplate::New(isolate, TestObjectV8Internal::runtimeEnabledOverloadedVoidMethodMethodCallback, v8Undefined(), defaultSignature, 1));
|
| + prototypeTemplate->Set(v8AtomicString(isolate, "partiallyRuntimeEnabledOverloadedVoidMethod"), v8::FunctionTemplate::New(isolate, TestObjectV8Internal::partiallyRuntimeEnabledOverloadedVoidMethodMethodCallback, v8Undefined(), defaultSignature, 1));
|
| instanceTemplate->Set(v8AtomicString(isolate, "unforgeableVoidMethod"), v8::FunctionTemplate::New(isolate, TestObjectV8Internal::unforgeableVoidMethodMethodCallback, v8Undefined(), defaultSignature, 0));
|
| functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "staticStringAttribute"), TestObjectV8Internal::staticStringAttributeAttributeGetterCallback, TestObjectV8Internal::staticStringAttributeAttributeSetterCallback, v8::External::New(isolate, 0), static_cast<v8::PropertyAttribute>(v8::None), v8::Handle<v8::AccessorSignature>(), static_cast<v8::AccessControl>(v8::DEFAULT));
|
| functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "staticLongAttribute"), TestObjectV8Internal::staticLongAttributeAttributeGetterCallback, TestObjectV8Internal::staticLongAttributeAttributeSetterCallback, v8::External::New(isolate, 0), static_cast<v8::PropertyAttribute>(v8::None), v8::Handle<v8::AccessorSignature>(), static_cast<v8::AccessControl>(v8::DEFAULT));
|
|
|