X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/14957cd040308e3eeec43d26bae5d76da13fcd85..a253471d7f8e4d91bf6ebabab00155c3b387d3d0:/runtime/JSWrapperObject.h diff --git a/runtime/JSWrapperObject.h b/runtime/JSWrapperObject.h index 8972648..65b4bdb 100644 --- a/runtime/JSWrapperObject.h +++ b/runtime/JSWrapperObject.h @@ -29,24 +29,24 @@ namespace JSC { // This class is used as a base for classes such as String, // Number, Boolean and Date which are wrappers for primitive types. class JSWrapperObject : public JSNonFinalObject { - protected: - explicit JSWrapperObject(JSGlobalData&, Structure*); - public: + typedef JSNonFinalObject Base; + JSValue internalValue() const; void setInternalValue(JSGlobalData&, JSValue); - static Structure* createStructure(JSGlobalData& globalData, JSValue prototype) + static Structure* createStructure(JSGlobalData& globalData, JSGlobalObject* globalObject, JSValue prototype) { - return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); + return Structure::create(globalData, globalObject, prototype, TypeInfo(ObjectType, StructureFlags), &s_info); } protected: + explicit JSWrapperObject(JSGlobalData&, Structure*); static const unsigned StructureFlags = OverridesVisitChildren | JSNonFinalObject::StructureFlags; + static void visitChildren(JSCell*, SlotVisitor&); + private: - virtual void visitChildren(SlotVisitor&); - WriteBarrier m_internalValue; };