Index: Source/bindings/tests/results/V8TestInterface.cpp |
diff --git a/Source/bindings/tests/results/V8TestInterface.cpp b/Source/bindings/tests/results/V8TestInterface.cpp |
index 926366825e2cd3c43d01969828ef7daee877779b..7df7134144a482398998111f3b5aed448d46b811 100644 |
--- a/Source/bindings/tests/results/V8TestInterface.cpp |
+++ b/Source/bindings/tests/results/V8TestInterface.cpp |
@@ -904,6 +904,19 @@ static void voidMethodMethodCallbackForMainWorld(const v8::FunctionCallbackInfo< |
TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
} |
+static void toStringMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
+{ |
+ TestInterfaceImplementation* impl = V8TestInterface::toNative(info.Holder()); |
+ v8SetReturnValueString(info, impl->toString(), info.GetIsolate()); |
+} |
+ |
+static void toStringMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
+{ |
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
+ TestInterfaceImplementationV8Internal::toStringMethod(info); |
+ TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
+} |
+ |
static void implementsVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
{ |
TestInterfaceImplementation* impl = V8TestInterface::toNative(info.Holder()); |
@@ -1401,6 +1414,7 @@ static void configureV8TestInterfaceTemplate(v8::Handle<v8::FunctionTemplate> fu |
functionTemplate->InstanceTemplate()->SetIndexedPropertyHandler(TestInterfaceImplementationV8Internal::indexedPropertyGetterCallback, TestInterfaceImplementationV8Internal::indexedPropertySetterCallback, 0, TestInterfaceImplementationV8Internal::indexedPropertyDeleterCallback, indexedPropertyEnumerator<TestInterfaceImplementation>); |
functionTemplate->InstanceTemplate()->SetNamedPropertyHandler(TestInterfaceImplementationV8Internal::namedPropertyGetterCallback, TestInterfaceImplementationV8Internal::namedPropertySetterCallback, TestInterfaceImplementationV8Internal::namedPropertyQueryCallback, TestInterfaceImplementationV8Internal::namedPropertyDeleterCallback, TestInterfaceImplementationV8Internal::namedPropertyEnumeratorCallback); |
functionTemplate->InstanceTemplate()->SetCallAsFunctionHandler(V8TestInterface::legacyCallCustom); |
+ prototypeTemplate->Set(v8AtomicString(isolate, "toString"), v8::FunctionTemplate::New(isolate, TestInterfaceImplementationV8Internal::toStringMethodCallback, v8Undefined(), defaultSignature, 0), static_cast<v8::PropertyAttribute>(v8::DontDelete | v8::DontEnum)); |
functionTemplate->Set(v8AtomicString(isolate, "implementsStaticVoidMethod"), v8::FunctionTemplate::New(isolate, TestInterfaceImplementationV8Internal::implementsStaticVoidMethodMethodCallback, v8Undefined(), v8::Local<v8::Signature>(), 0)); |
if (RuntimeEnabledFeatures::implements2FeatureNameEnabled()) { |
prototypeTemplate->Set(v8AtomicString(isolate, "implements2VoidMethod"), v8::FunctionTemplate::New(isolate, TestInterfaceImplementationV8Internal::implements2VoidMethodMethodCallback, v8Undefined(), defaultSignature, 0)); |