JSTestEventConstructor.h [plain text]
#ifndef JSTestEventConstructor_h
#define JSTestEventConstructor_h
#include "JSDOMWrapper.h"
#include "TestEventConstructor.h"
namespace WebCore {
class JSDictionary;
class JSTestEventConstructor : public JSDOMWrapper {
public:
typedef JSDOMWrapper Base;
static JSTestEventConstructor* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<TestEventConstructor> impl)
{
JSTestEventConstructor* ptr = new (NotNull, JSC::allocateCell<JSTestEventConstructor>(globalObject->vm().heap)) JSTestEventConstructor(structure, globalObject, impl);
ptr->finishCreation(globalObject->vm());
return ptr;
}
static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);
static JSC::JSObject* getPrototype(JSC::VM&, JSC::JSGlobalObject*);
static void destroy(JSC::JSCell*);
~JSTestEventConstructor();
DECLARE_INFO;
static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
{
return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
}
static JSC::JSValue getConstructor(JSC::VM&, JSC::JSGlobalObject*);
TestEventConstructor& impl() const { return *m_impl; }
void releaseImpl() { m_impl->deref(); m_impl = 0; }
void releaseImplIfNotNull()
{
if (m_impl) {
m_impl->deref();
m_impl = 0;
}
}
private:
TestEventConstructor* m_impl;
protected:
JSTestEventConstructor(JSC::Structure*, JSDOMGlobalObject*, PassRefPtr<TestEventConstructor>);
void finishCreation(JSC::VM& vm)
{
Base::finishCreation(vm);
ASSERT(inherits(info()));
}
};
class JSTestEventConstructorOwner : public JSC::WeakHandleOwner {
public:
virtual bool isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown>, void* context, JSC::SlotVisitor&);
virtual void finalize(JSC::Handle<JSC::Unknown>, void* context);
};
inline JSC::WeakHandleOwner* wrapperOwner(DOMWrapperWorld&, TestEventConstructor*)
{
DEPRECATED_DEFINE_STATIC_LOCAL(JSTestEventConstructorOwner, jsTestEventConstructorOwner, ());
return &jsTestEventConstructorOwner;
}
inline void* wrapperContext(DOMWrapperWorld& world, TestEventConstructor*)
{
return &world;
}
JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestEventConstructor*);
TestEventConstructor* toTestEventConstructor(JSC::JSValue);
bool fillTestEventConstructorInit(TestEventConstructorInit&, JSDictionary&);
}
#endif