Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(343)

Unified Diff: Source/bindings/tests/results/V8TestInterface2.cpp

Issue 345393004: IDL: Support 'stringifier' keyword (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: move handling of unnamed operations Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/bindings/tests/results/V8TestInterface.cpp ('k') | Source/bindings/tests/results/V8TestObject.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/tests/results/V8TestInterface2.cpp
diff --git a/Source/bindings/tests/results/V8TestInterface2.cpp b/Source/bindings/tests/results/V8TestInterface2.cpp
index d78d9edaea1d23ec7330ef778daadc5e6c79036b..0cb584cd9765aa510264cd142b7e2e582f72e33b 100644
--- a/Source/bindings/tests/results/V8TestInterface2.cpp
+++ b/Source/bindings/tests/results/V8TestInterface2.cpp
@@ -219,6 +219,32 @@ static void deleteNamedItemMethodCallback(const v8::FunctionCallbackInfo<v8::Val
TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
}
+static void stringifierMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
+{
+ TestInterface2* impl = V8TestInterface2::toNative(info.Holder());
+ v8SetReturnValueString(info, impl->stringifierMethod(), info.GetIsolate());
+}
+
+static void stringifierMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
+{
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
+ TestInterface2V8Internal::stringifierMethodMethod(info);
+ TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
+}
+
+static void toStringMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
+{
+ TestInterface2* impl = V8TestInterface2::toNative(info.Holder());
+ v8SetReturnValueString(info, impl->stringifierMethod(), info.GetIsolate());
+}
+
+static void toStringMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
+{
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
+ TestInterface2V8Internal::toStringMethod(info);
+ TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
+}
+
static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Isolate* isolate = info.GetIsolate();
@@ -422,6 +448,8 @@ static const V8DOMConfiguration::MethodConfiguration V8TestInterface2Methods[] =
{"namedItem", TestInterface2V8Internal::namedItemMethodCallback, 0, 1},
{"setNamedItem", TestInterface2V8Internal::setNamedItemMethodCallback, 0, 2},
{"deleteNamedItem", TestInterface2V8Internal::deleteNamedItemMethodCallback, 0, 1},
+ {"stringifierMethod", TestInterface2V8Internal::stringifierMethodMethodCallback, 0, 0},
+ {"toString", TestInterface2V8Internal::toStringMethodCallback, 0, 0},
};
void V8TestInterface2::constructorCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
« no previous file with comments | « Source/bindings/tests/results/V8TestInterface.cpp ('k') | Source/bindings/tests/results/V8TestObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698