X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/4e4e5a6f2694187498445a6ac6f1634ce8141119..1df5f87f1309a8daa30dabdee855f48ae40d14ab:/runtime/JSONObject.h diff --git a/runtime/JSONObject.h b/runtime/JSONObject.h index 7a9e0a4..b773320 100644 --- a/runtime/JSONObject.h +++ b/runtime/JSONObject.h @@ -26,25 +26,22 @@ #ifndef JSONObject_h #define JSONObject_h -#include "JSObject.h" +#include "JSObjectWithGlobalObject.h" namespace JSC { class Stringifier; - class JSONObject : public JSObject { + class JSONObject : public JSObjectWithGlobalObject { public: - JSONObject(NonNullPassRefPtr structure) - : JSObject(structure) - { - } + JSONObject(JSGlobalObject*, Structure*); - static PassRefPtr createStructure(JSValue prototype) + static Structure* createStructure(JSGlobalData& globalData, JSValue prototype) { - return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount); + return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); } - - static void markStringifiers(MarkStack&, Stringifier*); + + static const ClassInfo s_info; protected: static const unsigned StructureFlags = OverridesGetOwnPropertySlot | JSObject::StructureFlags; @@ -53,8 +50,6 @@ namespace JSC { virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&); - virtual const ClassInfo* classInfo() const { return &info; } - static const ClassInfo info; }; UString JSONStringify(ExecState* exec, JSValue value, unsigned indent);