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

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

Issue 17376006: Implement WebIDL implements (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add back [PerWorldBindings] Created 7 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.h ('k') | Source/core/core.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/tests/results/V8TestInterface.cpp
diff --git a/Source/bindings/tests/results/V8TestInterface.cpp b/Source/bindings/tests/results/V8TestInterface.cpp
index 320a2fbc1f68f4ef06dfdcebcb6c781fda65fd0f..4d8fa8d8c6e53a7aa8a7e741b1c577e573c5343a 100644
--- a/Source/bindings/tests/results/V8TestInterface.cpp
+++ b/Source/bindings/tests/results/V8TestInterface.cpp
@@ -371,6 +371,307 @@ static void Node15AttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::V
#endif // ENABLE(Condition11) || ENABLE(Condition12)
+#if ENABLE(Condition22) || ENABLE(Condition23)
+
+static void implementsStaticReadOnlyAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ v8SetReturnValueInt(info, TestInterface::implementsStaticReadOnlyAttr());
+ return;
+}
+
+#endif // ENABLE(Condition22) || ENABLE(Condition23)
+
+#if ENABLE(Condition22) || ENABLE(Condition23)
+
+static void implementsStaticReadOnlyAttrAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TestInterfaceV8Internal::implementsStaticReadOnlyAttrAttrGetter(name, info);
+}
+
+#endif // ENABLE(Condition22) || ENABLE(Condition23)
+
+#if ENABLE(Condition22) || ENABLE(Condition23)
+
+static void implementsStaticAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ v8SetReturnValue(info, v8String(TestInterface::implementsStaticAttr(), info.GetIsolate(), ReturnUnsafeHandle));
+ return;
+}
+
+#endif // ENABLE(Condition22) || ENABLE(Condition23)
+
+#if ENABLE(Condition22) || ENABLE(Condition23)
+
+static void implementsStaticAttrAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TestInterfaceV8Internal::implementsStaticAttrAttrGetter(name, info);
+}
+
+#endif // ENABLE(Condition22) || ENABLE(Condition23)
+
+#if ENABLE(Condition22) || ENABLE(Condition23)
+
+static void implementsStaticAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
+{
+ V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, v, value);
+ TestInterface::setImplementsStaticAttr(v);
+ return;
+}
+
+#endif // ENABLE(Condition22) || ENABLE(Condition23)
+
+#if ENABLE(Condition22) || ENABLE(Condition23)
+
+static void implementsStaticAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
+{
+ TestInterfaceV8Internal::implementsStaticAttrAttrSetter(name, value, info);
+}
+
+#endif // ENABLE(Condition22) || ENABLE(Condition23)
+
+#if ENABLE(Condition22) || ENABLE(Condition23)
+
+static void implementsStr1AttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TestInterface* imp = V8TestInterface::toNative(info.Holder());
+ v8SetReturnValue(info, v8String(imp->implementsStr1(), info.GetIsolate(), ReturnUnsafeHandle));
+ return;
+}
+
+#endif // ENABLE(Condition22) || ENABLE(Condition23)
+
+#if ENABLE(Condition22) || ENABLE(Condition23)
+
+static void implementsStr1AttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TestInterfaceV8Internal::implementsStr1AttrGetter(name, info);
+}
+
+#endif // ENABLE(Condition22) || ENABLE(Condition23)
+
+#if ENABLE(Condition22) || ENABLE(Condition23)
+
+static void implementsStr2AttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TestInterface* imp = V8TestInterface::toNative(info.Holder());
+ v8SetReturnValue(info, v8String(imp->implementsStr2(), info.GetIsolate(), ReturnUnsafeHandle));
+ return;
+}
+
+#endif // ENABLE(Condition22) || ENABLE(Condition23)
+
+#if ENABLE(Condition22) || ENABLE(Condition23)
+
+static void implementsStr2AttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TestInterfaceV8Internal::implementsStr2AttrGetter(name, info);
+}
+
+#endif // ENABLE(Condition22) || ENABLE(Condition23)
+
+#if ENABLE(Condition22) || ENABLE(Condition23)
+
+static void implementsStr2AttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
+{
+ TestInterface* imp = V8TestInterface::toNative(info.Holder());
+ V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, v, value);
+ imp->setImplementsStr2(v);
+ return;
+}
+
+#endif // ENABLE(Condition22) || ENABLE(Condition23)
+
+#if ENABLE(Condition22) || ENABLE(Condition23)
+
+static void implementsStr2AttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
+{
+ TestInterfaceV8Internal::implementsStr2AttrSetter(name, value, info);
+}
+
+#endif // ENABLE(Condition22) || ENABLE(Condition23)
+
+#if ENABLE(Condition22) || ENABLE(Condition23)
+
+static void implementsStr3AttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ V8TestInterface::implementsStr3AttrGetterCustom(name, info);
+}
+
+#endif // ENABLE(Condition22) || ENABLE(Condition23)
+
+#if ENABLE(Condition22) || ENABLE(Condition23)
+
+static void implementsStr3AttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
+{
+ V8TestInterface::implementsStr3AttrSetterCustom(name, value, info);
+}
+
+#endif // ENABLE(Condition22) || ENABLE(Condition23)
+
+#if ENABLE(Condition22) || ENABLE(Condition23)
+
+static void implementsNodeAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TestInterface* imp = V8TestInterface::toNative(info.Holder());
+ v8SetReturnValue(info, toV8Fast(imp->implementsNode(), info, imp));
+ return;
+}
+
+#endif // ENABLE(Condition22) || ENABLE(Condition23)
+
+#if ENABLE(Condition22) || ENABLE(Condition23)
+
+static void implementsNodeAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TestInterfaceV8Internal::implementsNodeAttrGetter(name, info);
+}
+
+#endif // ENABLE(Condition22) || ENABLE(Condition23)
+
+#if ENABLE(Condition22) || ENABLE(Condition23)
+
+static void implementsNodeAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
+{
+ TestInterface* imp = V8TestInterface::toNative(info.Holder());
+ V8TRYCATCH_VOID(Node*, v, V8Node::HasInstance(value, info.GetIsolate(), worldType(info.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(value)) : 0);
+ imp->setImplementsNode(WTF::getPtr(v));
+ return;
+}
+
+#endif // ENABLE(Condition22) || ENABLE(Condition23)
+
+#if ENABLE(Condition22) || ENABLE(Condition23)
+
+static void implementsNodeAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
+{
+ TestInterfaceV8Internal::implementsNodeAttrSetter(name, value, info);
+}
+
+#endif // ENABLE(Condition22) || ENABLE(Condition23)
+
+#if ENABLE(Condition22) || ENABLE(Condition23)
+
+static void Node23AttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TestInterface* imp = V8TestInterface::toNative(info.Holder());
+ v8SetReturnValue(info, toV8Fast(imp->node23(), info, imp));
+ return;
+}
+
+#endif // ENABLE(Condition22) || ENABLE(Condition23)
+
+#if ENABLE(Condition22) || ENABLE(Condition23)
+
+static void Node23AttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TestInterfaceV8Internal::Node23AttrGetter(name, info);
+}
+
+#endif // ENABLE(Condition22) || ENABLE(Condition23)
+
+#if ENABLE(Condition22) || ENABLE(Condition23)
+
+static void Node23AttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
+{
+ TestInterface* imp = V8TestInterface::toNative(info.Holder());
+ V8TRYCATCH_VOID(Node*, v, V8Node::HasInstance(value, info.GetIsolate(), worldType(info.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(value)) : 0);
+ imp->setNode23(WTF::getPtr(v));
+ return;
+}
+
+#endif // ENABLE(Condition22) || ENABLE(Condition23)
+
+#if ENABLE(Condition22) || ENABLE(Condition23)
+
+static void Node23AttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
+{
+ TestInterfaceV8Internal::Node23AttrSetter(name, value, info);
+}
+
+#endif // ENABLE(Condition22) || ENABLE(Condition23)
+
+#if ENABLE(Condition22) || ENABLE(Condition23)
+
+static void Node24AttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TestInterface* imp = V8TestInterface::toNative(info.Holder());
+ v8SetReturnValue(info, toV8Fast(imp->node24(), info, imp));
+ return;
+}
+
+#endif // ENABLE(Condition22) || ENABLE(Condition23)
+
+#if ENABLE(Condition22) || ENABLE(Condition23)
+
+static void Node24AttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TestInterfaceV8Internal::Node24AttrGetter(name, info);
+}
+
+#endif // ENABLE(Condition22) || ENABLE(Condition23)
+
+#if ENABLE(Condition22) || ENABLE(Condition23)
+
+static void Node24AttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
+{
+ TestInterface* imp = V8TestInterface::toNative(info.Holder());
+ V8TRYCATCH_VOID(Node*, v, V8Node::HasInstance(value, info.GetIsolate(), worldType(info.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(value)) : 0);
+ imp->setNode24(WTF::getPtr(v));
+ return;
+}
+
+#endif // ENABLE(Condition22) || ENABLE(Condition23)
+
+#if ENABLE(Condition22) || ENABLE(Condition23)
+
+static void Node24AttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
+{
+ TestInterfaceV8Internal::Node24AttrSetter(name, value, info);
+}
+
+#endif // ENABLE(Condition22) || ENABLE(Condition23)
+
+#if ENABLE(Condition22) || ENABLE(Condition23)
+
+static void Node25AttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TestInterface* imp = V8TestInterface::toNative(info.Holder());
+ v8SetReturnValue(info, toV8Fast(imp->node25(), info, imp));
+ return;
+}
+
+#endif // ENABLE(Condition22) || ENABLE(Condition23)
+
+#if ENABLE(Condition22) || ENABLE(Condition23)
+
+static void Node25AttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
+{
+ TestInterfaceV8Internal::Node25AttrGetter(name, info);
+}
+
+#endif // ENABLE(Condition22) || ENABLE(Condition23)
+
+#if ENABLE(Condition22) || ENABLE(Condition23)
+
+static void Node25AttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
+{
+ TestInterface* imp = V8TestInterface::toNative(info.Holder());
+ V8TRYCATCH_VOID(Node*, v, V8Node::HasInstance(value, info.GetIsolate(), worldType(info.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(value)) : 0);
+ imp->setNode25(WTF::getPtr(v));
+ return;
+}
+
+#endif // ENABLE(Condition22) || ENABLE(Condition23)
+
+#if ENABLE(Condition22) || ENABLE(Condition23)
+
+static void Node25AttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
+{
+ TestInterfaceV8Internal::Node25AttrSetter(name, value, info);
+}
+
+#endif // ENABLE(Condition22) || ENABLE(Condition23)
+
#if ENABLE(Condition11) || ENABLE(Condition12)
static void supplementalMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -454,6 +755,89 @@ static void supplementalMethod4MethodCallback(const v8::FunctionCallbackInfo<v8:
#endif // ENABLE(Condition11) || ENABLE(Condition12)
+#if ENABLE(Condition22) || ENABLE(Condition23)
+
+static void implementsMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& args)
+{
+ TestInterface* imp = V8TestInterface::toNative(args.Holder());
+ imp->implementsMethod1();
+
+ return;
+}
+
+#endif // ENABLE(Condition22) || ENABLE(Condition23)
+
+#if ENABLE(Condition22) || ENABLE(Condition23)
+
+static void implementsMethod1MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
+{
+ TestInterfaceV8Internal::implementsMethod1Method(args);
+}
+
+#endif // ENABLE(Condition22) || ENABLE(Condition23)
+
+#if ENABLE(Condition22) || ENABLE(Condition23)
+
+static void implementsMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& args)
+{
+ if (args.Length() < 2) {
+ throwNotEnoughArgumentsError(args.GetIsolate());
+ return;
+ }
+ TestInterface* imp = V8TestInterface::toNative(args.Holder());
+ ExceptionCode ec = 0;
+ V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, args[0]);
+ V8TRYCATCH_VOID(TestObj*, objArg, V8TestObject::HasInstance(args[1], args.GetIsolate(), worldType(args.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Object>::Cast(args[1])) : 0);
+ ScriptExecutionContext* scriptContext = getScriptExecutionContext();
+ RefPtr<TestObj> result = imp->implementsMethod2(scriptContext, strArg, objArg, ec);
+ if (UNLIKELY(ec)) {
+ setDOMException(ec, args.GetIsolate());
+ return;
+ }
+ v8SetReturnValue(args, toV8(result.release(), args.Holder(), args.GetIsolate()));
+ return;
+}
+
+#endif // ENABLE(Condition22) || ENABLE(Condition23)
+
+#if ENABLE(Condition22) || ENABLE(Condition23)
+
+static void implementsMethod2MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
+{
+ TestInterfaceV8Internal::implementsMethod2Method(args);
+}
+
+#endif // ENABLE(Condition22) || ENABLE(Condition23)
+
+#if ENABLE(Condition22) || ENABLE(Condition23)
+
+static void implementsMethod3MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
+{
+ V8TestInterface::implementsMethod3MethodCustom(args);
+}
+
+#endif // ENABLE(Condition22) || ENABLE(Condition23)
+
+#if ENABLE(Condition22) || ENABLE(Condition23)
+
+static void implementsMethod4Method(const v8::FunctionCallbackInfo<v8::Value>& args)
+{
+ TestInterface::implementsMethod4();
+
+ return;
+}
+
+#endif // ENABLE(Condition22) || ENABLE(Condition23)
+
+#if ENABLE(Condition22) || ENABLE(Condition23)
+
+static void implementsMethod4MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
+{
+ TestInterfaceV8Internal::implementsMethod4Method(args);
+}
+
+#endif // ENABLE(Condition22) || ENABLE(Condition23)
+
static void constructor(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (args.Length() < 1) {
@@ -504,6 +888,30 @@ static const V8DOMConfiguration::BatchedAttribute V8TestInterfaceAttrs[] = {
// Attribute 'supplementalNode'
{"supplementalNode", TestInterfaceV8Internal::supplementalNodeAttrGetterCallback, TestInterfaceV8Internal::supplementalNodeAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
#endif // ENABLE(Condition11) || ENABLE(Condition12)
+#if ENABLE(Condition22) || ENABLE(Condition23)
+ // Attribute 'implementsStaticReadOnlyAttr'
+ {"implementsStaticReadOnlyAttr", TestInterfaceV8Internal::implementsStaticReadOnlyAttrAttrGetterCallback, 0, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
+#endif // ENABLE(Condition22) || ENABLE(Condition23)
+#if ENABLE(Condition22) || ENABLE(Condition23)
+ // Attribute 'implementsStaticAttr'
+ {"implementsStaticAttr", TestInterfaceV8Internal::implementsStaticAttrAttrGetterCallback, TestInterfaceV8Internal::implementsStaticAttrAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
+#endif // ENABLE(Condition22) || ENABLE(Condition23)
+#if ENABLE(Condition22) || ENABLE(Condition23)
+ // Attribute 'implementsStr1'
+ {"implementsStr1", TestInterfaceV8Internal::implementsStr1AttrGetterCallback, 0, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
+#endif // ENABLE(Condition22) || ENABLE(Condition23)
+#if ENABLE(Condition22) || ENABLE(Condition23)
+ // Attribute 'implementsStr2'
+ {"implementsStr2", TestInterfaceV8Internal::implementsStr2AttrGetterCallback, TestInterfaceV8Internal::implementsStr2AttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
+#endif // ENABLE(Condition22) || ENABLE(Condition23)
+#if ENABLE(Condition22) || ENABLE(Condition23)
+ // Attribute 'implementsStr3'
+ {"implementsStr3", TestInterfaceV8Internal::implementsStr3AttrGetterCallback, TestInterfaceV8Internal::implementsStr3AttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
+#endif // ENABLE(Condition22) || ENABLE(Condition23)
+#if ENABLE(Condition22) || ENABLE(Condition23)
+ // Attribute 'implementsNode'
+ {"implementsNode", TestInterfaceV8Internal::implementsNodeAttrGetterCallback, TestInterfaceV8Internal::implementsNodeAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
+#endif // ENABLE(Condition22) || ENABLE(Condition23)
};
static const V8DOMConfiguration::BatchedMethod V8TestInterfaceMethods[] = {
@@ -513,6 +921,12 @@ static const V8DOMConfiguration::BatchedMethod V8TestInterfaceMethods[] = {
#if ENABLE(Condition11) || ENABLE(Condition12)
{"supplementalMethod3", TestInterfaceV8Internal::supplementalMethod3MethodCallback, 0, 0},
#endif
+#if ENABLE(Condition22) || ENABLE(Condition23)
+ {"implementsMethod1", TestInterfaceV8Internal::implementsMethod1MethodCallback, 0, 0},
+#endif
+#if ENABLE(Condition22) || ENABLE(Condition23)
+ {"implementsMethod3", TestInterfaceV8Internal::implementsMethod3MethodCallback, 0, 0},
+#endif
};
static const V8DOMConfiguration::BatchedConstant V8TestInterfaceConsts[] = {
@@ -522,6 +936,12 @@ static const V8DOMConfiguration::BatchedConstant V8TestInterfaceConsts[] = {
#if ENABLE(Condition11) || ENABLE(Condition12)
{"SUPPLEMENTALCONSTANT2", 2},
#endif
+#if ENABLE(Condition22) || ENABLE(Condition23)
+ {"IMPLEMENTSCONSTANT1", 1},
+#endif
+#if ENABLE(Condition22) || ENABLE(Condition23)
+ {"IMPLEMENTSCONSTANT2", 2},
+#endif
};
@@ -531,6 +951,12 @@ COMPILE_ASSERT(1 == TestPartialInterface::SUPPLEMENTALCONSTANT1, TestInterfaceEn
#if ENABLE(Condition11) || ENABLE(Condition12)
COMPILE_ASSERT(2 == TestPartialInterface::CONST_IMPL, TestInterfaceEnumCONST_IMPLIsWrongUseDoNotCheckConstants);
#endif
+#if ENABLE(Condition22) || ENABLE(Condition23)
+COMPILE_ASSERT(1 == TestInterface::IMPLEMENTSCONSTANT1, TestInterfaceEnumIMPLEMENTSCONSTANT1IsWrongUseDoNotCheckConstants);
+#endif
+#if ENABLE(Condition22) || ENABLE(Condition23)
+COMPILE_ASSERT(2 == TestInterface::CONST_IMPL, TestInterfaceEnumCONST_IMPLIsWrongUseDoNotCheckConstants);
+#endif
void V8TestInterface::constructorCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
@@ -633,6 +1059,16 @@ static v8::Handle<v8::FunctionTemplate> ConfigureV8TestInterfaceTemplate(v8::Han
}
#endif // ENABLE(Condition11) || ENABLE(Condition12)
+
+#if ENABLE(Condition22) || ENABLE(Condition23)
+ if (RuntimeEnabledFeatures::condition23Enabled()) {
+ static const V8DOMConfiguration::BatchedAttribute attrData =\
+ // Attribute 'Node23'
+ {"Node23", TestInterfaceV8Internal::Node23AttrGetterCallback, TestInterfaceV8Internal::Node23AttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */};
+ V8DOMConfiguration::configureAttribute(instance, proto, attrData, isolate, currentWorldType);
+ }
+
+#endif // ENABLE(Condition22) || ENABLE(Condition23)
desc->InstanceTemplate()->SetNamedPropertyHandler(V8TestInterface::namedPropertyGetter, V8TestInterface::namedPropertySetter, V8TestInterface::namedPropertyQuery, 0, V8TestInterface::namedPropertyEnumerator);
// Custom Signature 'supplementalMethod2'
@@ -645,6 +1081,17 @@ static v8::Handle<v8::FunctionTemplate> ConfigureV8TestInterfaceTemplate(v8::Han
#if ENABLE(Condition11) || ENABLE(Condition12)
desc->Set(v8::String::NewSymbol("supplementalMethod4"), v8::FunctionTemplate::New(TestInterfaceV8Internal::supplementalMethod4MethodCallback, v8Undefined(), v8::Local<v8::Signature>(), 0));
#endif // ENABLE(Condition11) || ENABLE(Condition12)
+
+ // Custom Signature 'implementsMethod2'
+ const int implementsMethod2Argc = 2;
+ v8::Handle<v8::FunctionTemplate> implementsMethod2Argv[implementsMethod2Argc] = { v8::Handle<v8::FunctionTemplate>(), V8PerIsolateData::from(isolate)->rawTemplate(&V8TestObject::info, currentWorldType) };
+ v8::Handle<v8::Signature> implementsMethod2Signature = v8::Signature::New(desc, implementsMethod2Argc, implementsMethod2Argv);
+#if ENABLE(Condition22) || ENABLE(Condition23)
+ proto->Set(v8::String::NewSymbol("implementsMethod2"), v8::FunctionTemplate::New(TestInterfaceV8Internal::implementsMethod2MethodCallback, v8Undefined(), implementsMethod2Signature, 2));
+#endif // ENABLE(Condition22) || ENABLE(Condition23)
+#if ENABLE(Condition22) || ENABLE(Condition23)
+ desc->Set(v8::String::NewSymbol("implementsMethod4"), v8::FunctionTemplate::New(TestInterfaceV8Internal::implementsMethod4MethodCallback, v8Undefined(), v8::Local<v8::Signature>(), 0));
+#endif // ENABLE(Condition22) || ENABLE(Condition23)
V8DOMConfiguration::batchConfigureConstants(desc, proto, V8TestInterfaceConsts, WTF_ARRAY_LENGTH(V8TestInterfaceConsts), isolate);
// Custom toString template
@@ -699,6 +1146,24 @@ void V8TestInterface::installPerContextProperties(v8::Handle<v8::Object> instanc
V8DOMConfiguration::configureAttribute(instance, proto, attrData, isolate);
}
#endif // ENABLE(Condition11) || ENABLE(Condition12)
+
+#if ENABLE(Condition22) || ENABLE(Condition23)
+ if (ContextFeatures::condition24Enabled(impl->document())) {
+ static const V8DOMConfiguration::BatchedAttribute attrData =\
+ // Attribute 'Node24'
+ {"Node24", TestInterfaceV8Internal::Node24AttrGetterCallback, TestInterfaceV8Internal::Node24AttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */};
+ V8DOMConfiguration::configureAttribute(instance, proto, attrData, isolate);
+ }
+#endif // ENABLE(Condition22) || ENABLE(Condition23)
+
+#if ENABLE(Condition22) || ENABLE(Condition23)
+ if (ContextFeatures::condition26Enabled(impl->document()) && RuntimeEnabledFeatures::condition25Enabled()) {
+ static const V8DOMConfiguration::BatchedAttribute attrData =\
+ // Attribute 'Node25'
+ {"Node25", TestInterfaceV8Internal::Node25AttrGetterCallback, TestInterfaceV8Internal::Node25AttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */};
+ V8DOMConfiguration::configureAttribute(instance, proto, attrData, isolate);
+ }
+#endif // ENABLE(Condition22) || ENABLE(Condition23)
}
ActiveDOMObject* V8TestInterface::toActiveDOMObject(v8::Handle<v8::Object> object)
« no previous file with comments | « Source/bindings/tests/results/V8TestInterface.h ('k') | Source/core/core.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698