X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/ba379fdc102753d6be2c4d937058fe40257329fe..14957cd040308e3eeec43d26bae5d76da13fcd85:/runtime/JSONObject.h?ds=sidebyside diff --git a/runtime/JSONObject.h b/runtime/JSONObject.h index 8d5364a..b773320 100644 --- a/runtime/JSONObject.h +++ b/runtime/JSONObject.h @@ -26,33 +26,34 @@ #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(PassRefPtr structure) - : JSObject(structure) - { - } + JSONObject(JSGlobalObject*, Structure*); - static PassRefPtr createStructure(JSValue prototype) + static Structure* createStructure(JSGlobalData& globalData, JSValue prototype) { - return Structure::create(prototype, TypeInfo(ObjectType)); + return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); } + + static const ClassInfo s_info; - static void markStringifiers(Stringifier*); + protected: + static const unsigned StructureFlags = OverridesGetOwnPropertySlot | JSObject::StructureFlags; private: 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