diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
commit | 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch) | |
tree | 46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/JavaScriptCore/runtime/JSONObject.h | |
parent | 32761a6cee1d0dee366b885b7b9c777e67885688 (diff) | |
download | WebKitGtk-tarball-master.tar.gz |
webkitgtk-2.16.5HEADwebkitgtk-2.16.5master
Diffstat (limited to 'Source/JavaScriptCore/runtime/JSONObject.h')
-rw-r--r-- | Source/JavaScriptCore/runtime/JSONObject.h | 55 |
1 files changed, 23 insertions, 32 deletions
diff --git a/Source/JavaScriptCore/runtime/JSONObject.h b/Source/JavaScriptCore/runtime/JSONObject.h index cacfc5d6c..6d72aca71 100644 --- a/Source/JavaScriptCore/runtime/JSONObject.h +++ b/Source/JavaScriptCore/runtime/JSONObject.h @@ -23,48 +23,39 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef JSONObject_h -#define JSONObject_h +#pragma once #include "JSObject.h" namespace JSC { - class Stringifier; +class JSONObject : public JSNonFinalObject { +public: + typedef JSNonFinalObject Base; + static const unsigned StructureFlags = Base::StructureFlags | HasStaticPropertyTable; - class JSONObject : public JSNonFinalObject { - public: - typedef JSNonFinalObject Base; + static JSONObject* create(VM& vm, Structure* structure) + { + JSONObject* object = new (NotNull, allocateCell<JSONObject>(vm.heap)) JSONObject(vm, structure); + object->finishCreation(vm); + return object; + } - 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; + static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype) + { + return Structure::create(vm, globalObject, prototype, TypeInfo(ObjectType, StructureFlags), info()); + } - protected: - void finishCreation(VM&); - static const unsigned StructureFlags = OverridesGetOwnPropertySlot | JSObject::StructureFlags; + DECLARE_INFO; - private: - JSONObject(VM&, Structure*); - static bool getOwnPropertySlot(JSObject*, ExecState*, PropertyName, PropertySlot&); +protected: + void finishCreation(VM&); - }; +private: + JSONObject(VM&, Structure*); +}; - JS_EXPORT_PRIVATE JSValue JSONParse(ExecState*, const String&); - JS_EXPORT_PRIVATE String JSONStringify(ExecState*, JSValue, unsigned indent); - - void escapeStringToBuilder(StringBuilder&, const String&); +JS_EXPORT_PRIVATE JSValue JSONParse(ExecState*, const String&); +JS_EXPORT_PRIVATE String JSONStringify(ExecState*, JSValue, unsigned indent); } // namespace JSC - -#endif // JSONObject_h |