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..0723d2aba5196ce154de0e44756933cefa133dd4 100644 |
--- a/Source/bindings/tests/results/V8TestInterface.cpp |
+++ b/Source/bindings/tests/results/V8TestInterface.cpp |
@@ -1147,6 +1147,19 @@ static void partial2StaticVoidMethodMethodCallback(const v8::FunctionCallbackInf |
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 indexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInfo<v8::Value>& info) |
{ |
TestInterfaceImplementation* impl = V8TestInterface::toNative(info.Holder()); |
@@ -1431,6 +1444,7 @@ static void configureV8TestInterfaceTemplate(v8::Handle<v8::FunctionTemplate> fu |
prototypeTemplate->Set(v8AtomicString(isolate, "partialVoidMethodPartialCallbackTypeArg"), v8::FunctionTemplate::New(isolate, TestInterfaceImplementationV8Internal::partialVoidMethodPartialCallbackTypeArgMethodCallback, v8Undefined(), defaultSignature, 1)); |
} |
#endif // ENABLE(PARTIAL_CONDITION) |
+ prototypeTemplate->Set(v8AtomicString(isolate, "toString"), v8::FunctionTemplate::New(isolate, TestInterfaceImplementationV8Internal::toStringMethodCallback, v8Undefined(), defaultSignature, 0), static_cast<v8::PropertyAttribute>(v8::DontDelete | v8::DontEnum)); |
functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "staticStringAttribute"), TestInterfaceImplementationV8Internal::staticStringAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::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, "implementsStaticReadOnlyLongAttribute"), TestInterfaceImplementationV8Internal::implementsStaticReadOnlyLongAttributeAttributeGetterCallback, 0, 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, "implementsStaticStringAttribute"), TestInterfaceImplementationV8Internal::implementsStaticStringAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::implementsStaticStringAttributeAttributeSetterCallback, v8::External::New(isolate, 0), static_cast<v8::PropertyAttribute>(v8::None), v8::Handle<v8::AccessorSignature>(), static_cast<v8::AccessControl>(v8::DEFAULT)); |