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

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

Issue 1226203012: Revert of bindings: Makes almost all attributes accessor-type properties. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 5 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
Index: Source/bindings/tests/results/core/V8TestInterfaceAccessors.cpp
diff --git a/Source/bindings/tests/results/core/V8TestInterfaceAccessors.cpp b/Source/bindings/tests/results/core/V8TestInterfaceAccessors.cpp
index d80547a0b11a045e26006d03cf02bc00e43defc6..8ce54f41381681e3ee7983d6f04000a7c161e895 100644
--- a/Source/bindings/tests/results/core/V8TestInterfaceAccessors.cpp
+++ b/Source/bindings/tests/results/core/V8TestInterfaceAccessors.cpp
@@ -103,21 +103,21 @@
TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
}
-static void doNotExposeJSAccessorAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
+static void doNotExposeJSAccessorAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestInterfaceAccessors* impl = V8TestInterfaceAccessors::toImpl(holder);
v8SetReturnValueInt(info, impl->doNotExposeJSAccessorAttribute());
}
-static void doNotExposeJSAccessorAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
+static void doNotExposeJSAccessorAttributeAttributeGetterCallback(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
TestInterfaceAccessorsV8Internal::doNotExposeJSAccessorAttributeAttributeGetter(info);
TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
}
-static void doNotExposeJSAccessorAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
+static void doNotExposeJSAccessorAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
{
v8::Local<v8::Object> holder = info.Holder();
ExceptionState exceptionState(ExceptionState::SetterContext, "doNotExposeJSAccessorAttribute", "TestInterfaceAccessors", holder, info.GetIsolate());
@@ -128,9 +128,8 @@
impl->setDoNotExposeJSAccessorAttribute(cppValue);
}
-static void doNotExposeJSAccessorAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Value> v8Value = info[0];
+static void doNotExposeJSAccessorAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
+{
TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
TestInterfaceAccessorsV8Internal::doNotExposeJSAccessorAttributeAttributeSetter(v8Value, info);
TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
@@ -138,10 +137,22 @@
} // namespace TestInterfaceAccessorsV8Internal
+// Suppress warning: global constructors, because AttributeConfiguration is trivial
+// and does not depend on another global objects.
+#if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG)
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wglobal-constructors"
+#endif
+static const V8DOMConfiguration::AttributeConfiguration V8TestInterfaceAccessorsAttributes[] = {
+ {"doNotExposeJSAccessorAttribute", TestInterfaceAccessorsV8Internal::doNotExposeJSAccessorAttributeAttributeGetterCallback, TestInterfaceAccessorsV8Internal::doNotExposeJSAccessorAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance, V8DOMConfiguration::CheckHolder},
+};
+#if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG)
+#pragma clang diagnostic pop
+#endif
+
static const V8DOMConfiguration::AccessorConfiguration V8TestInterfaceAccessorsAccessors[] = {
- {"noExposeJSAccessorAttribute", TestInterfaceAccessorsV8Internal::noExposeJSAccessorAttributeAttributeGetterCallback, TestInterfaceAccessorsV8Internal::noExposeJSAccessorAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder},
- {"exposeJSAccessorAttribute", TestInterfaceAccessorsV8Internal::exposeJSAccessorAttributeAttributeGetterCallback, TestInterfaceAccessorsV8Internal::exposeJSAccessorAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder},
- {"doNotExposeJSAccessorAttribute", TestInterfaceAccessorsV8Internal::doNotExposeJSAccessorAttributeAttributeGetterCallback, TestInterfaceAccessorsV8Internal::doNotExposeJSAccessorAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance, V8DOMConfiguration::CheckHolder},
+ {"noExposeJSAccessorAttribute", TestInterfaceAccessorsV8Internal::noExposeJSAccessorAttributeAttributeGetterCallback, TestInterfaceAccessorsV8Internal::noExposeJSAccessorAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder},
+ {"exposeJSAccessorAttribute", TestInterfaceAccessorsV8Internal::exposeJSAccessorAttributeAttributeGetterCallback, TestInterfaceAccessorsV8Internal::exposeJSAccessorAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder},
};
static void installV8TestInterfaceAccessorsTemplate(v8::Local<v8::FunctionTemplate> functionTemplate, v8::Isolate* isolate)
@@ -150,7 +161,7 @@
v8::Local<v8::Signature> defaultSignature;
defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, functionTemplate, "TestInterfaceAccessors", V8TestInterfaceEmpty::domTemplate(isolate), V8TestInterfaceAccessors::internalFieldCount,
- 0, 0,
+ V8TestInterfaceAccessorsAttributes, WTF_ARRAY_LENGTH(V8TestInterfaceAccessorsAttributes),
V8TestInterfaceAccessorsAccessors, WTF_ARRAY_LENGTH(V8TestInterfaceAccessorsAccessors),
0, 0);
v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceTemplate();

Powered by Google App Engine
This is Rietveld 408576698