diff options
Diffstat (limited to 'Source/JavaScriptCore/runtime/JSObjectWithGlobalObject.h')
-rw-r--r-- | Source/JavaScriptCore/runtime/JSObjectWithGlobalObject.h | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/Source/JavaScriptCore/runtime/JSObjectWithGlobalObject.h b/Source/JavaScriptCore/runtime/JSObjectWithGlobalObject.h index 9416a62..844bcd8 100644 --- a/Source/JavaScriptCore/runtime/JSObjectWithGlobalObject.h +++ b/Source/JavaScriptCore/runtime/JSObjectWithGlobalObject.h @@ -26,26 +26,30 @@ #ifndef JSObjectWithGlobalObject_h #define JSObjectWithGlobalObject_h -#include "JSObject.h" +#include "JSGlobalObject.h" namespace JSC { class JSGlobalObject; -class JSObjectWithGlobalObject : public JSObject { +class JSObjectWithGlobalObject : public JSNonFinalObject { public: - static PassRefPtr<Structure> createStructure(JSValue proto) + static Structure* createStructure(JSGlobalData& globalData, JSValue proto) { - return Structure::create(proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount); + return Structure::create(globalData, proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); } - JSGlobalObject* globalObject() const; + JSGlobalObject* globalObject() const + { + return asGlobalObject((getAnonymousValue(GlobalObjectSlot).asCell())); + } protected: - JSObjectWithGlobalObject(JSGlobalObject*, NonNullPassRefPtr<Structure>); + JSObjectWithGlobalObject(JSGlobalObject*, Structure*); + JSObjectWithGlobalObject(JSGlobalData&, JSGlobalObject*, Structure*); - JSObjectWithGlobalObject(NonNullPassRefPtr<Structure> structure) - : JSObject(structure) + JSObjectWithGlobalObject(VPtrStealingHackType) + : JSNonFinalObject(VPtrStealingHack) { // Should only be used by JSFunction when we aquire the JSFunction vptr. } |