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

Unified Diff: Source/bindings/tests/results/core/V8TestObject.cpp

Issue 1035023005: [bindings] Support CallWith=ThisValue for generic interface methods (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Binding patch alone. Created 5 years, 9 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/idls/core/TestObject.idl ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 97743e94952338077dd7141c81964ed2eecf4548..726dd5ae5e9dc323b0a8154a906fe7e2d0265925 100644
--- a/Source/bindings/tests/results/core/V8TestObject.cpp
+++ b/Source/bindings/tests/results/core/V8TestObject.cpp
@@ -9959,6 +9959,20 @@ static void callWithActiveWindowScriptWindowMethodCallback(const v8::FunctionCal
TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
}
+static void callWithThisValueMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
+{
+ TestObject* impl = V8TestObject::toImpl(info.Holder());
+ ScriptState* scriptState = ScriptState::current(info.GetIsolate());
+ impl->callWithThisValue(ScriptValue(scriptState, info.This()));
+}
+
+static void callWithThisValueMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
+{
+ TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
+ TestObjectV8Internal::callWithThisValueMethod(info);
+ TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
+}
+
static void checkSecurityForNodeVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObject* impl = V8TestObject::toImpl(info.Holder());
@@ -12439,6 +12453,7 @@ static const V8DOMConfiguration::MethodConfiguration V8TestObjectMethods[] = {
{"callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArg", TestObjectV8Internal::callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts},
{"callWithActiveWindow", TestObjectV8Internal::callWithActiveWindowMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts},
{"callWithActiveWindowScriptWindow", TestObjectV8Internal::callWithActiveWindowScriptWindowMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts},
+ {"callWithThisValue", TestObjectV8Internal::callWithThisValueMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts},
{"checkSecurityForNodeVoidMethod", TestObjectV8Internal::checkSecurityForNodeVoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts},
#if ENABLE(CONDITION)
{"conditionalConditionVoidMethod", TestObjectV8Internal::conditionalConditionVoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts},
« no previous file with comments | « Source/bindings/tests/idls/core/TestObject.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698