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

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

Issue 74783008: IDL compiler: [ActiveDOMObject] interface (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 7 years, 1 month 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/V8TestActiveDOMObjectInterface.cpp
diff --git a/Source/bindings/tests/results/V8TestInterfaceEmpty.cpp b/Source/bindings/tests/results/V8TestActiveDOMObjectInterface.cpp
similarity index 70%
copy from Source/bindings/tests/results/V8TestInterfaceEmpty.cpp
copy to Source/bindings/tests/results/V8TestActiveDOMObjectInterface.cpp
index 8cb8b5dd7c612e585d5555a5cd9d4605a3dca584..d1e236cad6d9e887ec3e4af6f69a45b3e22c7742 100644
--- a/Source/bindings/tests/results/V8TestInterfaceEmpty.cpp
+++ b/Source/bindings/tests/results/V8TestActiveDOMObjectInterface.cpp
@@ -31,7 +31,7 @@
// This file has been auto-generated by code_generator_v8.pm. DO NOT MODIFY!
#include "config.h"
-#include "V8TestInterfaceEmpty.h"
+#include "V8TestActiveDOMObjectInterface.h"
#include "RuntimeEnabledFeatures.h"
#include "bindings/v8/ScriptController.h"
@@ -45,10 +45,10 @@
namespace WebCore {
-static void initializeScriptWrappableForInterface(TestInterfaceEmpty* object)
+static void initializeScriptWrappableForInterface(TestActiveDOMObjectInterface* object)
{
if (ScriptWrappable::wrapperCanBeStoredInObject(object))
- ScriptWrappable::setTypeInfoInObject(object, &V8TestInterfaceEmpty::wrapperTypeInfo);
+ ScriptWrappable::setTypeInfoInObject(object, &V8TestActiveDOMObjectInterface::wrapperTypeInfo);
else
ASSERT_NOT_REACHED();
}
@@ -59,26 +59,26 @@ static void initializeScriptWrappableForInterface(TestInterfaceEmpty* object)
// 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::TestInterfaceEmpty* object)
+void webCoreInitializeScriptWrappableForInterface(WebCore::TestActiveDOMObjectInterface* object)
{
WebCore::initializeScriptWrappableForInterface(object);
}
namespace WebCore {
-const WrapperTypeInfo V8TestInterfaceEmpty::wrapperTypeInfo = { V8TestInterfaceEmpty::GetTemplate, V8TestInterfaceEmpty::derefObject, 0, 0, 0, V8TestInterfaceEmpty::installPerContextEnabledMethods, 0, WrapperTypeObjectPrototype };
+const WrapperTypeInfo V8TestActiveDOMObjectInterface::wrapperTypeInfo = { V8TestActiveDOMObjectInterface::GetTemplate, V8TestActiveDOMObjectInterface::derefObject, V8TestActiveDOMObjectInterface::toActiveDOMObject, 0, 0, V8TestActiveDOMObjectInterface::installPerContextEnabledMethods, 0, WrapperTypeObjectPrototype };
-namespace TestInterfaceEmptyV8Internal {
+namespace TestActiveDOMObjectInterfaceV8Internal {
template <typename T> void V8_USE(T) { }
-} // namespace TestInterfaceEmptyV8Internal
+} // namespace TestActiveDOMObjectInterfaceV8Internal
-static v8::Handle<v8::FunctionTemplate> ConfigureV8TestInterfaceEmptyTemplate(v8::Handle<v8::FunctionTemplate> functionTemplate, v8::Isolate* isolate, WrapperWorldType currentWorldType)
+static v8::Handle<v8::FunctionTemplate> ConfigureV8TestActiveDOMObjectInterfaceTemplate(v8::Handle<v8::FunctionTemplate> functionTemplate, v8::Isolate* isolate, WrapperWorldType currentWorldType)
{
functionTemplate->ReadOnlyPrototype();
v8::Local<v8::Signature> defaultSignature;
- defaultSignature = V8DOMConfiguration::installDOMClassTemplate(functionTemplate, "TestInterfaceEmpty", v8::Local<v8::FunctionTemplate>(), V8TestInterfaceEmpty::internalFieldCount,
+ defaultSignature = V8DOMConfiguration::installDOMClassTemplate(functionTemplate, "TestActiveDOMObjectInterface", v8::Local<v8::FunctionTemplate>(), V8TestActiveDOMObjectInterface::internalFieldCount,
0, 0,
0, 0,
0, 0,
@@ -94,7 +94,7 @@ static v8::Handle<v8::FunctionTemplate> ConfigureV8TestInterfaceEmptyTemplate(v8
return functionTemplate;
}
-v8::Handle<v8::FunctionTemplate> V8TestInterfaceEmpty::GetTemplate(v8::Isolate* isolate, WrapperWorldType currentWorldType)
+v8::Handle<v8::FunctionTemplate> V8TestActiveDOMObjectInterface::GetTemplate(v8::Isolate* isolate, WrapperWorldType currentWorldType)
{
V8PerIsolateData* data = V8PerIsolateData::from(isolate);
V8PerIsolateData::TemplateMap::iterator result = data->templateMap(currentWorldType).find(&wrapperTypeInfo);
@@ -104,27 +104,32 @@ v8::Handle<v8::FunctionTemplate> V8TestInterfaceEmpty::GetTemplate(v8::Isolate*
TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "BuildDOMTemplate");
v8::HandleScope handleScope(isolate);
v8::Handle<v8::FunctionTemplate> templ =
- ConfigureV8TestInterfaceEmptyTemplate(data->rawTemplate(&wrapperTypeInfo, currentWorldType), isolate, currentWorldType);
+ ConfigureV8TestActiveDOMObjectInterfaceTemplate(data->rawTemplate(&wrapperTypeInfo, currentWorldType), isolate, currentWorldType);
data->templateMap(currentWorldType).add(&wrapperTypeInfo, UnsafePersistent<v8::FunctionTemplate>(isolate, templ));
return handleScope.Close(templ);
}
-bool V8TestInterfaceEmpty::hasInstance(v8::Handle<v8::Value> jsValue, v8::Isolate* isolate, WrapperWorldType currentWorldType)
+bool V8TestActiveDOMObjectInterface::hasInstance(v8::Handle<v8::Value> jsValue, v8::Isolate* isolate, WrapperWorldType currentWorldType)
{
return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, jsValue, currentWorldType);
}
-bool V8TestInterfaceEmpty::hasInstanceInAnyWorld(v8::Handle<v8::Value> jsValue, v8::Isolate* isolate)
+bool V8TestActiveDOMObjectInterface::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> V8TestInterfaceEmpty::createWrapper(PassRefPtr<TestInterfaceEmpty> impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
+ActiveDOMObject* V8TestActiveDOMObjectInterface::toActiveDOMObject(v8::Handle<v8::Object> object)
+{
+ return toNative(object);
+}
+
+v8::Handle<v8::Object> V8TestActiveDOMObjectInterface::createWrapper(PassRefPtr<TestActiveDOMObjectInterface> impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
{
ASSERT(impl);
- ASSERT(!DOMDataStore::containsWrapper<V8TestInterfaceEmpty>(impl.get(), isolate));
+ ASSERT(!DOMDataStore::containsWrapper<V8TestActiveDOMObjectInterface>(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
@@ -137,11 +142,11 @@ v8::Handle<v8::Object> V8TestInterfaceEmpty::createWrapper(PassRefPtr<TestInterf
return wrapper;
installPerContextEnabledProperties(wrapper, impl.get(), isolate);
- V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceEmpty>(impl, &wrapperTypeInfo, wrapper, isolate, WrapperConfiguration::Independent);
+ V8DOMWrapper::associateObjectWithWrapper<V8TestActiveDOMObjectInterface>(impl, &wrapperTypeInfo, wrapper, isolate, WrapperConfiguration::Dependent);
return wrapper;
}
-void V8TestInterfaceEmpty::derefObject(void* object)
+void V8TestActiveDOMObjectInterface::derefObject(void* object)
{
fromInternalPointer(object)->deref();
}

Powered by Google App Engine
This is Rietveld 408576698