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

Unified Diff: Source/bindings/tests/results/core/V8TestInterfaceOwnProperties.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/V8TestInterfaceOwnProperties.cpp
diff --git a/Source/bindings/tests/results/core/V8TestInterfaceOwnProperties.cpp b/Source/bindings/tests/results/core/V8TestInterfaceOwnProperties.cpp
index 8c9100e5dc036b09594efe2070060abf7f34bb46..35a0bdefdadf92da05ce5abd4badcc71823442b0 100644
--- a/Source/bindings/tests/results/core/V8TestInterfaceOwnProperties.cpp
+++ b/Source/bindings/tests/results/core/V8TestInterfaceOwnProperties.cpp
@@ -37,21 +37,21 @@
namespace TestInterfaceOwnPropertiesV8Internal {
-static void noExposeJSAccessorAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
+static void noExposeJSAccessorAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestInterfaceOwnProperties* impl = V8TestInterfaceOwnProperties::toImpl(holder);
v8SetReturnValueInt(info, impl->noExposeJSAccessorAttribute());
}
-static void noExposeJSAccessorAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
+static void noExposeJSAccessorAttributeAttributeGetterCallback(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
TestInterfaceOwnPropertiesV8Internal::noExposeJSAccessorAttributeAttributeGetter(info);
TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
}
-static void noExposeJSAccessorAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
+static void noExposeJSAccessorAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
{
v8::Local<v8::Object> holder = info.Holder();
ExceptionState exceptionState(ExceptionState::SetterContext, "noExposeJSAccessorAttribute", "TestInterfaceOwnProperties", holder, info.GetIsolate());
@@ -62,9 +62,8 @@
impl->setNoExposeJSAccessorAttribute(cppValue);
}
-static void noExposeJSAccessorAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8::Local<v8::Value> v8Value = info[0];
+static void noExposeJSAccessorAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
+{
TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
TestInterfaceOwnPropertiesV8Internal::noExposeJSAccessorAttributeAttributeSetter(v8Value, info);
TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
@@ -103,21 +102,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();
TestInterfaceOwnProperties* impl = V8TestInterfaceOwnProperties::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");
TestInterfaceOwnPropertiesV8Internal::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", "TestInterfaceOwnProperties", holder, info.GetIsolate());
@@ -128,9 +127,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");
TestInterfaceOwnPropertiesV8Internal::doNotExposeJSAccessorAttributeAttributeSetter(v8Value, info);
TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
@@ -138,10 +136,22 @@
} // namespace TestInterfaceOwnPropertiesV8Internal
+// 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 V8TestInterfaceOwnPropertiesAttributes[] = {
+ {"noExposeJSAccessorAttribute", TestInterfaceOwnPropertiesV8Internal::noExposeJSAccessorAttributeAttributeGetterCallback, TestInterfaceOwnPropertiesV8Internal::noExposeJSAccessorAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance, V8DOMConfiguration::CheckHolder},
+ {"doNotExposeJSAccessorAttribute", TestInterfaceOwnPropertiesV8Internal::doNotExposeJSAccessorAttributeAttributeGetterCallback, TestInterfaceOwnPropertiesV8Internal::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 V8TestInterfaceOwnPropertiesAccessors[] = {
- {"noExposeJSAccessorAttribute", TestInterfaceOwnPropertiesV8Internal::noExposeJSAccessorAttributeAttributeGetterCallback, TestInterfaceOwnPropertiesV8Internal::noExposeJSAccessorAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance, V8DOMConfiguration::CheckHolder},
- {"exposeJSAccessorAttribute", TestInterfaceOwnPropertiesV8Internal::exposeJSAccessorAttributeAttributeGetterCallback, TestInterfaceOwnPropertiesV8Internal::exposeJSAccessorAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder},
- {"doNotExposeJSAccessorAttribute", TestInterfaceOwnPropertiesV8Internal::doNotExposeJSAccessorAttributeAttributeGetterCallback, TestInterfaceOwnPropertiesV8Internal::doNotExposeJSAccessorAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance, V8DOMConfiguration::CheckHolder},
+ {"exposeJSAccessorAttribute", TestInterfaceOwnPropertiesV8Internal::exposeJSAccessorAttributeAttributeGetterCallback, TestInterfaceOwnPropertiesV8Internal::exposeJSAccessorAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder},
};
static void installV8TestInterfaceOwnPropertiesTemplate(v8::Local<v8::FunctionTemplate> functionTemplate, v8::Isolate* isolate)
@@ -150,7 +160,7 @@
v8::Local<v8::Signature> defaultSignature;
defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, functionTemplate, "TestInterfaceOwnProperties", V8TestInterfaceEmpty::domTemplate(isolate), V8TestInterfaceOwnProperties::internalFieldCount,
- 0, 0,
+ V8TestInterfaceOwnPropertiesAttributes, WTF_ARRAY_LENGTH(V8TestInterfaceOwnPropertiesAttributes),
V8TestInterfaceOwnPropertiesAccessors, WTF_ARRAY_LENGTH(V8TestInterfaceOwnPropertiesAccessors),
0, 0);
v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceTemplate();

Powered by Google App Engine
This is Rietveld 408576698