#ifndef V8TestInterface3_h
#define V8TestInterface3_h
+#include "bindings/core/v8/ScriptWrappable.h"
+#include "bindings/core/v8/V8Binding.h"
+#include "bindings/core/v8/V8DOMWrapper.h"
+#include "bindings/core/v8/WrapperTypeInfo.h"
#include "bindings/tests/idls/TestInterface3.h"
-#include "bindings/v8/V8Binding.h"
-#include "bindings/v8/V8DOMWrapper.h"
-#include "bindings/v8/WrapperTypeInfo.h"
#include "platform/heap/Handle.h"
-namespace WebCore {
+namespace blink {
class V8TestInterface3 {
public:
static v8::Handle<v8::FunctionTemplate> domTemplate(v8::Isolate*);
static TestInterface3* toNative(v8::Handle<v8::Object> object)
{
- return fromInternalPointer(object->GetAlignedPointerFromInternalField(v8DOMWrapperObjectIndex));
+ return fromInternalPointer(blink::toInternalPointer(object));
}
static TestInterface3* toNativeWithTypeCheck(v8::Isolate*, v8::Handle<v8::Value>);
static const WrapperTypeInfo wrapperTypeInfo;
- static void derefObject(void*);
- static void visitDOMWrapper(void*, const v8::Persistent<v8::Object>&, v8::Isolate*);
+ static void derefObject(ScriptWrappableBase* internalPointer);
+ static void visitDOMWrapper(ScriptWrappableBase* internalPointer, const v8::Persistent<v8::Object>&, v8::Isolate*);
static void indexedPropertyGetterCustom(uint32_t, const v8::PropertyCallbackInfo<v8::Value>&);
static void indexedPropertySetterCustom(uint32_t, v8::Local<v8::Value>, const v8::PropertyCallbackInfo<v8::Value>&);
static void indexedPropertyDeleterCustom(uint32_t, const v8::PropertyCallbackInfo<v8::Boolean>&);
static void namedPropertyDeleterCustom(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Boolean>&);
static void namedPropertyEnumeratorCustom(const v8::PropertyCallbackInfo<v8::Array>&);
static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0;
- static inline void* toInternalPointer(TestInterface3* impl)
+ static inline ScriptWrappableBase* toInternalPointer(TestInterface3* impl)
{
- return impl;
+ return reinterpret_cast<ScriptWrappableBase*>(static_cast<void*>(impl));
}
- static inline TestInterface3* fromInternalPointer(void* object)
+ static inline TestInterface3* fromInternalPointer(ScriptWrappableBase* internalPointer)
{
- return static_cast<TestInterface3*>(object);
+ return reinterpret_cast<TestInterface3*>(static_cast<void*>(internalPointer));
}
- static void installPerContextEnabledProperties(v8::Handle<v8::Object>, TestInterface3*, v8::Isolate*) { }
- static void installPerContextEnabledMethods(v8::Handle<v8::Object>, v8::Isolate*) { }
+ static void installConditionallyEnabledProperties(v8::Handle<v8::Object>, v8::Isolate*) { }
+ static void installConditionallyEnabledMethods(v8::Handle<v8::Object>, v8::Isolate*) { }
private:
friend v8::Handle<v8::Object> wrap(TestInterface3*, v8::Handle<v8::Object> creationContext, v8::Isolate*);
static v8::Handle<v8::Object> createWrapper(PassRefPtr<TestInterface3>, v8::Handle<v8::Object> creationContext, v8::Isolate*);
};
-inline v8::Handle<v8::Object> wrap(TestInterface3* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
-{
- ASSERT(impl);
- ASSERT(!DOMDataStore::containsWrapper<V8TestInterface3>(impl, isolate));
- return V8TestInterface3::createWrapper(impl, creationContext, isolate);
-}
+v8::Handle<v8::Object> wrap(TestInterface3* impl, v8::Handle<v8::Object> creationContext, v8::Isolate*);
inline v8::Handle<v8::Value> toV8(TestInterface3* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
{