X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/9dae56ea45a0f5f8136a5c93d6f3a7f99399ca73..14957cd040308e3eeec43d26bae5d76da13fcd85:/API/JSCallbackConstructor.h diff --git a/API/JSCallbackConstructor.h b/API/JSCallbackConstructor.h index cb8307f..64b237d 100644 --- a/API/JSCallbackConstructor.h +++ b/API/JSCallbackConstructor.h @@ -27,26 +27,28 @@ #define JSCallbackConstructor_h #include "JSObjectRef.h" -#include +#include namespace JSC { -class JSCallbackConstructor : public JSObject { +class JSCallbackConstructor : public JSObjectWithGlobalObject { public: - JSCallbackConstructor(PassRefPtr, JSClassRef, JSObjectCallAsConstructorCallback); + JSCallbackConstructor(JSGlobalObject*, Structure*, JSClassRef, JSObjectCallAsConstructorCallback); virtual ~JSCallbackConstructor(); JSClassRef classRef() const { return m_class; } JSObjectCallAsConstructorCallback callback() const { return m_callback; } - static const ClassInfo info; - - static PassRefPtr createStructure(JSValuePtr proto) - { - return Structure::create(proto, TypeInfo(ObjectType, ImplementsHasInstance | HasStandardGetOwnPropertySlot)); + static const ClassInfo s_info; + + static Structure* createStructure(JSGlobalData& globalData, JSValue proto) + { + return Structure::create(globalData, proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); } +protected: + static const unsigned StructureFlags = ImplementsHasInstance | JSObject::StructureFlags; + private: virtual ConstructType getConstructData(ConstructData&); - virtual const ClassInfo* classInfo() const { return &info; } JSClassRef m_class; JSObjectCallAsConstructorCallback m_callback;