X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/f9bf01c6616d5ddcf65b13b33cedf9e387ff7a63..14957cd040308e3eeec43d26bae5d76da13fcd85:/runtime/JSONObject.h?ds=sidebyside diff --git a/runtime/JSONObject.h b/runtime/JSONObject.h index 905e4bc..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,10 +50,10 @@ 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); + } // namespace JSC #endif // JSONObject_h