summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/runtime/JSONObject.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/JavaScriptCore/runtime/JSONObject.h')
-rw-r--r--Source/JavaScriptCore/runtime/JSONObject.h55
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