From 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Tue, 27 Jun 2017 06:07:23 +0000 Subject: webkitgtk-2.16.5 --- Source/JavaScriptCore/runtime/JSONObject.h | 55 +++++++++++++----------------- 1 file changed, 23 insertions(+), 32 deletions(-) (limited to 'Source/JavaScriptCore/runtime/JSONObject.h') 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(vm.heap)) JSONObject(vm, structure); + object->finishCreation(vm); + return object; + } - static JSONObject* create(VM& vm, Structure* structure) - { - JSONObject* object = new (NotNull, allocateCell(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 -- cgit v1.2.1