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

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

Issue 426583003: Revert of Enable the WebIDL [Exposed] annotation on an interface's members. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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
« no previous file with comments | « Source/bindings/tests/results/V8TestInterface.h ('k') | Source/bindings/tests/results/V8TestInterface2.h » ('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 c672d4cbfdbc486495a4a4f80659524b5fc7c856..7127a446707ec3599d175cc0a8e37f5bd5f347a4 100644
--- a/Source/bindings/tests/results/V8TestInterface.cpp
+++ b/Source/bindings/tests/results/V8TestInterface.cpp
@@ -47,7 +47,7 @@
}
namespace blink {
-const WrapperTypeInfo V8TestInterface::wrapperTypeInfo = { gin::kEmbedderBlink, V8TestInterface::domTemplate, V8TestInterface::derefObject, V8TestInterface::toActiveDOMObject, 0, V8TestInterface::visitDOMWrapper, V8TestInterface::installConditionallyEnabledMethods, &V8TestInterfaceEmpty::wrapperTypeInfo, WrapperTypeObjectPrototype, RefCountedObject };
+const WrapperTypeInfo V8TestInterface::wrapperTypeInfo = { gin::kEmbedderBlink, V8TestInterface::domTemplate, V8TestInterface::derefObject, V8TestInterface::toActiveDOMObject, 0, V8TestInterface::visitDOMWrapper, V8TestInterface::installPerContextEnabledMethods, &V8TestInterfaceEmpty::wrapperTypeInfo, WrapperTypeObjectPrototype, RefCountedObject };
namespace TestInterfaceImplementationV8Internal {
@@ -238,96 +238,6 @@
{
TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
TestInterfaceImplementationV8Internal::staticStringAttributeAttributeSetter(v8Value, info);
- TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
-}
-
-static void alwaysExposedAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
-{
- v8::Handle<v8::Object> holder = info.Holder();
- TestInterfaceImplementation* impl = V8TestInterface::toNative(holder);
- v8SetReturnValueInt(info, impl->alwaysExposedAttribute());
-}
-
-static void alwaysExposedAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
-{
- TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
- TestInterfaceImplementationV8Internal::alwaysExposedAttributeAttributeGetter(info);
- TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
-}
-
-static void alwaysExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
-{
- v8::Handle<v8::Object> holder = info.Holder();
- ExceptionState exceptionState(ExceptionState::SetterContext, "alwaysExposedAttribute", "TestInterface", holder, info.GetIsolate());
- TestInterfaceImplementation* impl = V8TestInterface::toNative(holder);
- TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState), exceptionState);
- impl->setAlwaysExposedAttribute(cppValue);
-}
-
-static void alwaysExposedAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
-{
- TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
- TestInterfaceImplementationV8Internal::alwaysExposedAttributeAttributeSetter(v8Value, info);
- TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
-}
-
-static void workerExposedAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
-{
- v8::Handle<v8::Object> holder = info.Holder();
- TestInterfaceImplementation* impl = V8TestInterface::toNative(holder);
- v8SetReturnValueInt(info, impl->workerExposedAttribute());
-}
-
-static void workerExposedAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
-{
- TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
- TestInterfaceImplementationV8Internal::workerExposedAttributeAttributeGetter(info);
- TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
-}
-
-static void workerExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
-{
- v8::Handle<v8::Object> holder = info.Holder();
- ExceptionState exceptionState(ExceptionState::SetterContext, "workerExposedAttribute", "TestInterface", holder, info.GetIsolate());
- TestInterfaceImplementation* impl = V8TestInterface::toNative(holder);
- TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState), exceptionState);
- impl->setWorkerExposedAttribute(cppValue);
-}
-
-static void workerExposedAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
-{
- TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
- TestInterfaceImplementationV8Internal::workerExposedAttributeAttributeSetter(v8Value, info);
- TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
-}
-
-static void windowExposedAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
-{
- v8::Handle<v8::Object> holder = info.Holder();
- TestInterfaceImplementation* impl = V8TestInterface::toNative(holder);
- v8SetReturnValueInt(info, impl->windowExposedAttribute());
-}
-
-static void windowExposedAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
-{
- TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
- TestInterfaceImplementationV8Internal::windowExposedAttributeAttributeGetter(info);
- TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
-}
-
-static void windowExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
-{
- v8::Handle<v8::Object> holder = info.Holder();
- ExceptionState exceptionState(ExceptionState::SetterContext, "windowExposedAttribute", "TestInterface", holder, info.GetIsolate());
- TestInterfaceImplementation* impl = V8TestInterface::toNative(holder);
- TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState), exceptionState);
- impl->setWindowExposedAttribute(cppValue);
-}
-
-static void windowExposedAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
-{
- TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
- TestInterfaceImplementationV8Internal::windowExposedAttributeAttributeSetter(v8Value, info);
TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
}
@@ -994,94 +904,6 @@
TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
}
-static void alwaysExposedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementation* impl = V8TestInterface::toNative(info.Holder());
- impl->alwaysExposedMethod();
-}
-
-static void alwaysExposedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
- TestInterfaceImplementationV8Internal::alwaysExposedMethodMethod(info);
- TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
-}
-
-static void workerExposedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementation* impl = V8TestInterface::toNative(info.Holder());
- impl->workerExposedMethod();
-}
-
-static void workerExposedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
- TestInterfaceImplementationV8Internal::workerExposedMethodMethod(info);
- TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
-}
-
-static void windowExposedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementation* impl = V8TestInterface::toNative(info.Holder());
- impl->windowExposedMethod();
-}
-
-static void windowExposedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
- TestInterfaceImplementationV8Internal::windowExposedMethodMethod(info);
- TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
-}
-
-static void alwaysExposedStaticMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementation::alwaysExposedStaticMethod();
-}
-
-static void alwaysExposedStaticMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
- TestInterfaceImplementationV8Internal::alwaysExposedStaticMethodMethod(info);
- TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
-}
-
-static void workerExposedStaticMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementation::workerExposedStaticMethod();
-}
-
-static void workerExposedStaticMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
- TestInterfaceImplementationV8Internal::workerExposedStaticMethodMethod(info);
- TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
-}
-
-static void windowExposedStaticMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementation::windowExposedStaticMethod();
-}
-
-static void windowExposedStaticMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
- TestInterfaceImplementationV8Internal::windowExposedStaticMethodMethod(info);
- TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
-}
-
-static void windowAndServiceWorkerExposedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TestInterfaceImplementation* impl = V8TestInterface::toNative(info.Holder());
- impl->windowAndServiceWorkerExposedMethod();
-}
-
-static void windowAndServiceWorkerExposedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
- TestInterfaceImplementationV8Internal::windowAndServiceWorkerExposedMethodMethod(info);
- TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
-}
-
static void implementsVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestInterfaceImplementation* impl = V8TestInterface::toNative(info.Holder());
@@ -1512,7 +1334,6 @@
{"floatAttribute", TestInterfaceImplementationV8Internal::floatAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::floatAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance},
{"unrestrictedDoubleAttribute", TestInterfaceImplementationV8Internal::unrestrictedDoubleAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::unrestrictedDoubleAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance},
{"unrestrictedFloatAttribute", TestInterfaceImplementationV8Internal::unrestrictedFloatAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::unrestrictedFloatAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance},
- {"alwaysExposedAttribute", TestInterfaceImplementationV8Internal::alwaysExposedAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::alwaysExposedAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance},
{"implementsReadonlyStringAttribute", TestInterfaceImplementationV8Internal::implementsReadonlyStringAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance},
{"implementsStringAttribute", TestInterfaceImplementationV8Internal::implementsStringAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::implementsStringAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance},
{"implementsNodeAttribute", TestInterfaceImplementationV8Internal::implementsNodeAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::implementsNodeAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance},
@@ -1525,7 +1346,6 @@
{"voidMethodDoubleArgFloatArg", TestInterfaceImplementationV8Internal::voidMethodDoubleArgFloatArgMethodCallback, 0, 2, V8DOMConfiguration::ExposedToAllScripts},
{"voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg", TestInterfaceImplementationV8Internal::voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethodCallback, 0, 2, V8DOMConfiguration::ExposedToAllScripts},
{"voidMethod", TestInterfaceImplementationV8Internal::voidMethodMethodCallback, TestInterfaceImplementationV8Internal::voidMethodMethodCallbackForMainWorld, 0, V8DOMConfiguration::ExposedToAllScripts},
- {"alwaysExposedMethod", TestInterfaceImplementationV8Internal::alwaysExposedMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts},
{"implementsVoidMethod", TestInterfaceImplementationV8Internal::implementsVoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts},
{"implementsComplexMethod", TestInterfaceImplementationV8Internal::implementsComplexMethodMethodCallback, 0, 2, V8DOMConfiguration::ExposedToAllScripts},
{"implementsCustomVoidMethod", TestInterfaceImplementationV8Internal::implementsCustomVoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts},
@@ -1593,10 +1413,6 @@
functionTemplate->InstanceTemplate()->SetIndexedPropertyHandler(TestInterfaceImplementationV8Internal::indexedPropertyGetterCallback, TestInterfaceImplementationV8Internal::indexedPropertySetterCallback, 0, TestInterfaceImplementationV8Internal::indexedPropertyDeleterCallback, indexedPropertyEnumerator<TestInterfaceImplementation>);
functionTemplate->InstanceTemplate()->SetNamedPropertyHandler(TestInterfaceImplementationV8Internal::namedPropertyGetterCallback, TestInterfaceImplementationV8Internal::namedPropertySetterCallback, TestInterfaceImplementationV8Internal::namedPropertyQueryCallback, TestInterfaceImplementationV8Internal::namedPropertyDeleterCallback, TestInterfaceImplementationV8Internal::namedPropertyEnumeratorCallback);
functionTemplate->InstanceTemplate()->SetCallAsFunctionHandler(V8TestInterface::legacyCallCustom);
- static const V8DOMConfiguration::MethodConfiguration alwaysExposedStaticMethodMethodConfiguration = {
- "alwaysExposedStaticMethod", TestInterfaceImplementationV8Internal::alwaysExposedStaticMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts,
- };
- V8DOMConfiguration::installMethodCustomSignature(functionTemplate, v8::Local<v8::Signature>(), v8::None, alwaysExposedStaticMethodMethodConfiguration, isolate);
static const V8DOMConfiguration::MethodConfiguration implementsStaticVoidMethodMethodConfiguration = {
"implementsStaticVoidMethod", TestInterfaceImplementationV8Internal::implementsStaticVoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts,
};
@@ -1689,64 +1505,35 @@
return hasInstance(value, isolate) ? fromInternalPointer(v8::Handle<v8::Object>::Cast(value)->GetAlignedPointerFromInternalField(v8DOMWrapperObjectIndex)) : 0;
}
-void V8TestInterface::installConditionallyEnabledProperties(v8::Handle<v8::Object> instanceTemplate, v8::Isolate* isolate)
+void V8TestInterface::installPerContextEnabledProperties(v8::Handle<v8::Object> instanceTemplate, TestInterfaceImplementation* impl, v8::Isolate* isolate)
{
v8::Local<v8::Object> prototypeTemplate = v8::Local<v8::Object>::Cast(instanceTemplate->GetPrototype());
- ExecutionContext* context = toExecutionContext(prototypeTemplate->CreationContext());
-
- if (context && (context->isWorkerGlobalScope())) {
- static const V8DOMConfiguration::AttributeConfiguration attributeConfiguration =\
- {"workerExposedAttribute", TestInterfaceImplementationV8Internal::workerExposedAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::workerExposedAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance};
- V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate, attributeConfiguration, isolate);
- }
- if (context && (context->isDocument())) {
- static const V8DOMConfiguration::AttributeConfiguration attributeConfiguration =\
- {"windowExposedAttribute", TestInterfaceImplementationV8Internal::windowExposedAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::windowExposedAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance};
- V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate, attributeConfiguration, isolate);
- }
- if (context && context->isDocument() && ContextFeatures::implementsContextNameEnabled(toDocument(context))) {
+ if (ContextFeatures::implementsContextNameEnabled(impl->document())) {
static const V8DOMConfiguration::AttributeConfiguration attributeConfiguration =\
{"implementsPerContextEnabledNodeAttribute", TestInterfaceImplementationV8Internal::implementsPerContextEnabledNodeAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::implementsPerContextEnabledNodeAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance};
V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate, attributeConfiguration, isolate);
}
- if (context && context->isDocument() && ContextFeatures::partialContextNameEnabled(toDocument(context))) {
+ if (ContextFeatures::partialContextNameEnabled(impl->document())) {
static const V8DOMConfiguration::AttributeConfiguration attributeConfiguration =\
{"partial2LongAttribute", TestInterfaceImplementationV8Internal::partial2LongAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::partial2LongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance};
V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate, attributeConfiguration, isolate);
}
- if (context && context->isDocument() && ContextFeatures::partialContextNameEnabled(toDocument(context))) {
+ if (ContextFeatures::partialContextNameEnabled(impl->document())) {
static const V8DOMConfiguration::AttributeConfiguration attributeConfiguration =\
{"partial2StaticLongAttribute", TestInterfaceImplementationV8Internal::partial2StaticLongAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::partial2StaticLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance};
V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate, attributeConfiguration, isolate);
}
}
-void V8TestInterface::installConditionallyEnabledMethods(v8::Handle<v8::Object> prototypeTemplate, v8::Isolate* isolate)
+void V8TestInterface::installPerContextEnabledMethods(v8::Handle<v8::Object> prototypeTemplate, v8::Isolate* isolate)
{
v8::Local<v8::Signature> defaultSignature = v8::Signature::New(isolate, domTemplate(isolate));
+
ExecutionContext* context = toExecutionContext(prototypeTemplate->CreationContext());
-
- if (context && (context->isWorkerGlobalScope())) {
- prototypeTemplate->Set(v8AtomicString(isolate, "workerExposedMethod"), v8::FunctionTemplate::New(isolate, TestInterfaceImplementationV8Internal::workerExposedMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFunction());
- }
- if (context && (context->isDocument())) {
- prototypeTemplate->Set(v8AtomicString(isolate, "windowExposedMethod"), v8::FunctionTemplate::New(isolate, TestInterfaceImplementationV8Internal::windowExposedMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFunction());
- }
- if (context && (context->isWorkerGlobalScope())) {
- prototypeTemplate->Set(v8AtomicString(isolate, "workerExposedStaticMethod"), v8::FunctionTemplate::New(isolate, TestInterfaceImplementationV8Internal::workerExposedStaticMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFunction());
- }
- if (context && (context->isDocument())) {
- prototypeTemplate->Set(v8AtomicString(isolate, "windowExposedStaticMethod"), v8::FunctionTemplate::New(isolate, TestInterfaceImplementationV8Internal::windowExposedStaticMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFunction());
- }
- if (context && (context->isServiceWorkerGlobalScope() || context->isDocument())) {
- prototypeTemplate->Set(v8AtomicString(isolate, "windowAndServiceWorkerExposedMethod"), v8::FunctionTemplate::New(isolate, TestInterfaceImplementationV8Internal::windowAndServiceWorkerExposedMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFunction());
- }
- if (context && context->isDocument() && ContextFeatures::partialContextNameEnabled(toDocument(context))) {
+ if (context && context->isDocument() && ContextFeatures::partialContextNameEnabled(toDocument(context)))
prototypeTemplate->Set(v8AtomicString(isolate, "partial2VoidMethod"), v8::FunctionTemplate::New(isolate, TestInterfaceImplementationV8Internal::partial2VoidMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFunction());
- }
- if (context && context->isDocument() && ContextFeatures::partialContextNameEnabled(toDocument(context))) {
+ if (context && context->isDocument() && ContextFeatures::partialContextNameEnabled(toDocument(context)))
prototypeTemplate->Set(v8AtomicString(isolate, "partial2StaticVoidMethod"), v8::FunctionTemplate::New(isolate, TestInterfaceImplementationV8Internal::partial2StaticVoidMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFunction());
- }
}
ActiveDOMObject* V8TestInterface::toActiveDOMObject(v8::Handle<v8::Object> wrapper)
« no previous file with comments | « Source/bindings/tests/results/V8TestInterface.h ('k') | Source/bindings/tests/results/V8TestInterface2.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698