Index: Source/bindings/tests/results/V8TestInterfacePython.cpp |
diff --git a/Source/bindings/tests/results/V8TestGenerateVisitDOMWrapperInterface.cpp b/Source/bindings/tests/results/V8TestInterfacePython.cpp |
similarity index 67% |
rename from Source/bindings/tests/results/V8TestGenerateVisitDOMWrapperInterface.cpp |
rename to Source/bindings/tests/results/V8TestInterfacePython.cpp |
index 9833da4524d81cb87cb3e337ba01e0b27a1cb0ab..8d796a6465dd48821772b20e81aebcc2fc531021 100644 |
--- a/Source/bindings/tests/results/V8TestGenerateVisitDOMWrapperInterface.cpp |
+++ b/Source/bindings/tests/results/V8TestInterfacePython.cpp |
@@ -31,7 +31,8 @@ |
// This file has been auto-generated by code_generator_v8.pm. DO NOT MODIFY! |
#include "config.h" |
-#include "V8TestGenerateVisitDOMWrapperInterface.h" |
+#if ENABLE(CONDITION) |
+#include "V8TestInterfacePython.h" |
#include "RuntimeEnabledFeatures.h" |
#include "bindings/v8/ScriptController.h" |
@@ -47,10 +48,10 @@ |
namespace WebCore { |
-static void initializeScriptWrappableForInterface(TestGenerateVisitDOMWrapperInterface* object) |
+static void initializeScriptWrappableForInterface(TestInterfacePython* object) |
{ |
if (ScriptWrappable::wrapperCanBeStoredInObject(object)) |
- ScriptWrappable::setTypeInfoInObject(object, &V8TestGenerateVisitDOMWrapperInterface::wrapperTypeInfo); |
+ ScriptWrappable::setTypeInfoInObject(object, &V8TestInterfacePython::wrapperTypeInfo); |
else |
ASSERT_NOT_REACHED(); |
} |
@@ -61,23 +62,23 @@ static void initializeScriptWrappableForInterface(TestGenerateVisitDOMWrapperInt |
// the local declaration does not pick up the surrounding namespace. Therefore, we provide this function |
// in the global namespace. |
// (More info on the MSVC bug here: http://connect.microsoft.com/VisualStudio/feedback/details/664619/the-namespace-of-local-function-declarations-in-c) |
-void webCoreInitializeScriptWrappableForInterface(WebCore::TestGenerateVisitDOMWrapperInterface* object) |
+void webCoreInitializeScriptWrappableForInterface(WebCore::TestInterfacePython* object) |
{ |
WebCore::initializeScriptWrappableForInterface(object); |
} |
namespace WebCore { |
-const WrapperTypeInfo V8TestGenerateVisitDOMWrapperInterface::wrapperTypeInfo = { gin::kEmbedderBlink, V8TestGenerateVisitDOMWrapperInterface::GetTemplate, V8TestGenerateVisitDOMWrapperInterface::derefObject, 0, 0, V8TestGenerateVisitDOMWrapperInterface::visitDOMWrapper, V8TestGenerateVisitDOMWrapperInterface::installPerContextEnabledMethods, 0, WrapperTypeObjectPrototype }; |
+const WrapperTypeInfo V8TestInterfacePython::wrapperTypeInfo = { gin::kEmbedderBlink, V8TestInterfacePython::GetTemplate, V8TestInterfacePython::derefObject, V8TestInterfacePython::toActiveDOMObject, 0, V8TestInterfacePython::visitDOMWrapper, V8TestInterfacePython::installPerContextEnabledMethods, 0, WrapperTypeObjectPrototype }; |
-namespace TestGenerateVisitDOMWrapperInterfaceV8Internal { |
+namespace TestInterfacePythonV8Internal { |
template <typename T> void V8_USE(T) { } |
-} // namespace TestGenerateVisitDOMWrapperInterfaceV8Internal |
+} // namespace TestInterfacePythonV8Internal |
-void V8TestGenerateVisitDOMWrapperInterface::visitDOMWrapper(void* object, const v8::Persistent<v8::Object>& wrapper, v8::Isolate* isolate) |
+void V8TestInterfacePython::visitDOMWrapper(void* object, const v8::Persistent<v8::Object>& wrapper, v8::Isolate* isolate) |
{ |
- TestGenerateVisitDOMWrapperInterface* impl = fromInternalPointer(object); |
+ TestInterfacePython* impl = fromInternalPointer(object); |
if (Node* owner = impl->ownerNode()) { |
setObjectGroup(V8GCController::opaqueRootForGC(owner, isolate), wrapper, isolate); |
return; |
@@ -85,12 +86,12 @@ void V8TestGenerateVisitDOMWrapperInterface::visitDOMWrapper(void* object, const |
setObjectGroup(object, wrapper, isolate); |
} |
-static v8::Handle<v8::FunctionTemplate> ConfigureV8TestGenerateVisitDOMWrapperInterfaceTemplate(v8::Handle<v8::FunctionTemplate> functionTemplate, v8::Isolate* isolate, WrapperWorldType currentWorldType) |
+static v8::Handle<v8::FunctionTemplate> ConfigureV8TestInterfacePythonTemplate(v8::Handle<v8::FunctionTemplate> functionTemplate, v8::Isolate* isolate, WrapperWorldType currentWorldType) |
{ |
functionTemplate->ReadOnlyPrototype(); |
v8::Local<v8::Signature> defaultSignature; |
- defaultSignature = V8DOMConfiguration::installDOMClassTemplate(functionTemplate, "TestGenerateVisitDOMWrapperInterface", v8::Local<v8::FunctionTemplate>(), V8TestGenerateVisitDOMWrapperInterface::internalFieldCount, |
+ defaultSignature = V8DOMConfiguration::installDOMClassTemplate(functionTemplate, "TestInterfacePython", v8::Local<v8::FunctionTemplate>(), V8TestInterfacePython::internalFieldCount, |
0, 0, |
0, 0, |
0, 0, |
@@ -100,13 +101,14 @@ static v8::Handle<v8::FunctionTemplate> ConfigureV8TestGenerateVisitDOMWrapperIn |
v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->PrototypeTemplate(); |
UNUSED_PARAM(instanceTemplate); |
UNUSED_PARAM(prototypeTemplate); |
+ functionTemplate->InstanceTemplate()->SetCallAsFunctionHandler(V8TestInterfacePython::legacyCallCustom); |
// Custom toString template |
functionTemplate->Set(v8::String::NewFromUtf8(isolate, "toString", v8::String::kInternalizedString), V8PerIsolateData::current()->toStringTemplate()); |
return functionTemplate; |
} |
-v8::Handle<v8::FunctionTemplate> V8TestGenerateVisitDOMWrapperInterface::GetTemplate(v8::Isolate* isolate, WrapperWorldType currentWorldType) |
+v8::Handle<v8::FunctionTemplate> V8TestInterfacePython::GetTemplate(v8::Isolate* isolate, WrapperWorldType currentWorldType) |
{ |
V8PerIsolateData* data = V8PerIsolateData::from(isolate); |
V8PerIsolateData::TemplateMap::iterator result = data->templateMap(currentWorldType).find(&wrapperTypeInfo); |
@@ -116,27 +118,32 @@ v8::Handle<v8::FunctionTemplate> V8TestGenerateVisitDOMWrapperInterface::GetTemp |
TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "BuildDOMTemplate"); |
v8::EscapableHandleScope handleScope(isolate); |
v8::Local<v8::FunctionTemplate> templ = |
- ConfigureV8TestGenerateVisitDOMWrapperInterfaceTemplate(data->rawTemplate(&wrapperTypeInfo, currentWorldType), isolate, currentWorldType); |
+ ConfigureV8TestInterfacePythonTemplate(data->rawTemplate(&wrapperTypeInfo, currentWorldType), isolate, currentWorldType); |
data->templateMap(currentWorldType).add(&wrapperTypeInfo, UnsafePersistent<v8::FunctionTemplate>(isolate, templ)); |
return handleScope.Escape(templ); |
} |
-bool V8TestGenerateVisitDOMWrapperInterface::hasInstance(v8::Handle<v8::Value> jsValue, v8::Isolate* isolate, WrapperWorldType currentWorldType) |
+bool V8TestInterfacePython::hasInstance(v8::Handle<v8::Value> jsValue, v8::Isolate* isolate, WrapperWorldType currentWorldType) |
{ |
return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, jsValue, currentWorldType); |
} |
-bool V8TestGenerateVisitDOMWrapperInterface::hasInstanceInAnyWorld(v8::Handle<v8::Value> jsValue, v8::Isolate* isolate) |
+bool V8TestInterfacePython::hasInstanceInAnyWorld(v8::Handle<v8::Value> jsValue, v8::Isolate* isolate) |
{ |
return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, jsValue, MainWorld) |
|| V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, jsValue, IsolatedWorld) |
|| V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, jsValue, WorkerWorld); |
} |
-v8::Handle<v8::Object> V8TestGenerateVisitDOMWrapperInterface::createWrapper(PassRefPtr<TestGenerateVisitDOMWrapperInterface> impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) |
+ActiveDOMObject* V8TestInterfacePython::toActiveDOMObject(v8::Handle<v8::Object> wrapper) |
+{ |
+ return toNative(wrapper); |
+} |
+ |
+v8::Handle<v8::Object> V8TestInterfacePython::createWrapper(PassRefPtr<TestInterfacePython> impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) |
{ |
ASSERT(impl); |
- ASSERT(!DOMDataStore::containsWrapper<V8TestGenerateVisitDOMWrapperInterface>(impl.get(), isolate)); |
+ ASSERT(!DOMDataStore::containsWrapper<V8TestInterfacePython>(impl.get(), isolate)); |
if (ScriptWrappable::wrapperCanBeStoredInObject(impl.get())) { |
const WrapperTypeInfo* actualInfo = ScriptWrappable::getTypeInfoFromObject(impl.get()); |
// Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapperTypeInfo. These will both have |
@@ -149,19 +156,20 @@ v8::Handle<v8::Object> V8TestGenerateVisitDOMWrapperInterface::createWrapper(Pas |
return wrapper; |
installPerContextEnabledProperties(wrapper, impl.get(), isolate); |
- V8DOMWrapper::associateObjectWithWrapper<V8TestGenerateVisitDOMWrapperInterface>(impl, &wrapperTypeInfo, wrapper, isolate, WrapperConfiguration::Dependent); |
+ V8DOMWrapper::associateObjectWithWrapper<V8TestInterfacePython>(impl, &wrapperTypeInfo, wrapper, isolate, WrapperConfiguration::Dependent); |
return wrapper; |
} |
-void V8TestGenerateVisitDOMWrapperInterface::derefObject(void* object) |
+void V8TestInterfacePython::derefObject(void* object) |
{ |
fromInternalPointer(object)->deref(); |
} |
template<> |
-v8::Handle<v8::Value> toV8NoInline(TestGenerateVisitDOMWrapperInterface* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) |
+v8::Handle<v8::Value> toV8NoInline(TestInterfacePython* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) |
{ |
return toV8(impl, creationContext, isolate); |
} |
} // namespace WebCore |
+#endif // ENABLE(CONDITION) |