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/V8TestObject.cpp

Issue 236783002: Pass NewScriptState to idbAnyToScriptValue() and idbKeyToScriptValue() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 8 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/TestObject.idl ('k') | Source/bindings/v8/DOMRequestState.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/tests/results/V8TestObject.cpp
diff --git a/Source/bindings/tests/results/V8TestObject.cpp b/Source/bindings/tests/results/V8TestObject.cpp
index 360ad019ceee574ba199c140f4e325878288ffef..353f02b010c10405aa6d6c75bbf9b2bbc3acdf35 100644
--- a/Source/bindings/tests/results/V8TestObject.cpp
+++ b/Source/bindings/tests/results/V8TestObject.cpp
@@ -1762,6 +1762,68 @@ static void callWithExecutionContextAnyAttributeAttributeSetterCallback(v8::Loca
TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
}
+static void callWithNewScriptStateAnyAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ v8::Handle<v8::Object> holder = info.Holder();
+ TestObject* impl = V8TestObject::toNative(holder);
+ NewScriptState* state = NewScriptState::current(info.GetIsolate());
+ v8SetReturnValue(info, impl->callWithNewScriptStateAnyAttribute(state).v8Value());
+}
+
+static void callWithNewScriptStateAnyAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
+ TestObjectV8Internal::callWithNewScriptStateAnyAttributeAttributeGetter(info);
+ TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
+}
+
+static void callWithNewScriptStateAnyAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
+{
+ v8::Handle<v8::Object> holder = info.Holder();
+ TestObject* impl = V8TestObject::toNative(holder);
+ TONATIVE_VOID(ScriptValue, cppValue, ScriptValue(v8Value, info.GetIsolate()));
+ impl->setCallWithNewScriptStateAnyAttribute(state, cppValue);
+}
+
+static void callWithNewScriptStateAnyAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
+{
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
+ TestObjectV8Internal::callWithNewScriptStateAnyAttributeAttributeSetter(v8Value, info);
+ TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
+}
+
+static void callWithExecutionContextAndNewScriptStateAnyAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ v8::Handle<v8::Object> holder = info.Holder();
+ TestObject* impl = V8TestObject::toNative(holder);
+ ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate());
+ NewScriptState* state = NewScriptState::current(info.GetIsolate());
+ v8SetReturnValue(info, impl->callWithExecutionContextAndNewScriptStateAnyAttribute(state, scriptContext).v8Value());
+}
+
+static void callWithExecutionContextAndNewScriptStateAnyAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
+ TestObjectV8Internal::callWithExecutionContextAndNewScriptStateAnyAttributeAttributeGetter(info);
+ TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
+}
+
+static void callWithExecutionContextAndNewScriptStateAnyAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
+{
+ v8::Handle<v8::Object> holder = info.Holder();
+ TestObject* impl = V8TestObject::toNative(holder);
+ TONATIVE_VOID(ScriptValue, cppValue, ScriptValue(v8Value, info.GetIsolate()));
+ ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate());
+ impl->setCallWithExecutionContextAndNewScriptStateAnyAttribute(state, scriptContext, cppValue);
+}
+
+static void callWithExecutionContextAndNewScriptStateAnyAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
+{
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
+ TestObjectV8Internal::callWithExecutionContextAndNewScriptStateAnyAttributeAttributeSetter(v8Value, info);
+ TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
+}
+
static void checkSecurityForNodeReadonlyDocumentAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
{
v8::Handle<v8::Object> holder = info.Holder();
@@ -7912,6 +7974,8 @@ static const V8DOMConfiguration::AttributeConfiguration V8TestObjectAttributes[]
{"activityLoggingSetterForAllWorldsLongAttribute", TestObjectV8Internal::activityLoggingSetterForAllWorldsLongAttributeAttributeGetterCallback, TestObjectV8Internal::activityLoggingSetterForAllWorldsLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
{"cachedAttributeAnyAttribute", TestObjectV8Internal::cachedAttributeAnyAttributeAttributeGetterCallback, TestObjectV8Internal::cachedAttributeAnyAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
{"callWithExecutionContextAnyAttribute", TestObjectV8Internal::callWithExecutionContextAnyAttributeAttributeGetterCallback, TestObjectV8Internal::callWithExecutionContextAnyAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
+ {"callWithNewScriptStateAnyAttribute", TestObjectV8Internal::callWithNewScriptStateAnyAttributeAttributeGetterCallback, TestObjectV8Internal::callWithNewScriptStateAnyAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
+ {"callWithExecutionContextAndNewScriptStateAnyAttribute", TestObjectV8Internal::callWithExecutionContextAndNewScriptStateAnyAttributeAttributeGetterCallback, TestObjectV8Internal::callWithExecutionContextAndNewScriptStateAnyAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
{"checkSecurityForNodeReadonlyDocumentAttribute", TestObjectV8Internal::checkSecurityForNodeReadonlyDocumentAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
#if ENABLE(CONDITION)
{"conditionalLongAttribute", TestObjectV8Internal::conditionalLongAttributeAttributeGetterCallback, TestObjectV8Internal::conditionalLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
« no previous file with comments | « Source/bindings/tests/idls/TestObject.idl ('k') | Source/bindings/v8/DOMRequestState.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698