diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2016-04-10 09:28:39 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2016-04-10 09:28:39 +0000 |
commit | 32761a6cee1d0dee366b885b7b9c777e67885688 (patch) | |
tree | d6bec92bebfb216f4126356e55518842c2f476a1 /Source/JavaScriptCore/runtime/JSONObject.h | |
parent | a4e969f4965059196ca948db781e52f7cfebf19e (diff) | |
download | WebKitGtk-tarball-32761a6cee1d0dee366b885b7b9c777e67885688.tar.gz |
webkitgtk-2.4.11webkitgtk-2.4.11
Diffstat (limited to 'Source/JavaScriptCore/runtime/JSONObject.h')
-rw-r--r-- | Source/JavaScriptCore/runtime/JSONObject.h | 50 |
1 files changed, 27 insertions, 23 deletions
diff --git a/Source/JavaScriptCore/runtime/JSONObject.h b/Source/JavaScriptCore/runtime/JSONObject.h index db00a69e3..cacfc5d6c 100644 --- a/Source/JavaScriptCore/runtime/JSONObject.h +++ b/Source/JavaScriptCore/runtime/JSONObject.h @@ -30,36 +30,40 @@ namespace JSC { -class JSONObject : public JSNonFinalObject { -public: - typedef JSNonFinalObject Base; - static const unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot; + class Stringifier; - static JSONObject* create(VM& vm, Structure* structure) - { - JSONObject* object = new (NotNull, allocateCell<JSONObject>(vm.heap)) JSONObject(vm, structure); - object->finishCreation(vm); - return object; - } + class JSONObject : public JSNonFinalObject { + public: + typedef JSNonFinalObject Base; - static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype) - { - return Structure::create(vm, globalObject, prototype, TypeInfo(ObjectType, StructureFlags), info()); - } + static JSONObject* create(VM& vm, Structure* structure) + { + JSONObject* object = new (NotNull, allocateCell<JSONObject>(vm.heap)) JSONObject(vm, structure); + object->finishCreation(vm); + return object; + } + + static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype) + { + return Structure::create(vm, globalObject, prototype, TypeInfo(ObjectType, StructureFlags), info()); + } + + DECLARE_INFO; - DECLARE_INFO; + protected: + void finishCreation(VM&); + static const unsigned StructureFlags = OverridesGetOwnPropertySlot | JSObject::StructureFlags; -protected: - void finishCreation(VM&); + private: + JSONObject(VM&, Structure*); + static bool getOwnPropertySlot(JSObject*, ExecState*, PropertyName, PropertySlot&); -private: - JSONObject(VM&, Structure*); - static bool getOwnPropertySlot(JSObject*, ExecState*, PropertyName, PropertySlot&); -}; + }; -JS_EXPORT_PRIVATE JSValue JSONParse(ExecState*, const String&); -JS_EXPORT_PRIVATE String JSONStringify(ExecState*, JSValue, unsigned indent); + JS_EXPORT_PRIVATE JSValue JSONParse(ExecState*, const String&); + JS_EXPORT_PRIVATE String JSONStringify(ExecState*, JSValue, unsigned indent); + void escapeStringToBuilder(StringBuilder&, const String&); } // namespace JSC |