]> git.saurik.com Git - apple/javascriptcore.git/blobdiff - runtime/BooleanObject.h
JavaScriptCore-1097.13.tar.gz
[apple/javascriptcore.git] / runtime / BooleanObject.h
index def44b44dcd84fce03269190ff67cabb500272b2..2704ff3cd4f92a34eff18a4f0c1cf40466ca5249 100644 (file)
 namespace JSC {
 
     class BooleanObject : public JSWrapperObject {
+    protected:
+        BooleanObject(JSGlobalData&, Structure*);
+        void finishCreation(JSGlobalData&);
+
     public:
-        explicit BooleanObject(JSGlobalData&, Structure*);
+        typedef JSWrapperObject Base;
 
+        static BooleanObject* create(JSGlobalData& globalData, Structure* structure)
+        {
+            BooleanObject* boolean = new (NotNull, allocateCell<BooleanObject>(globalData.heap)) BooleanObject(globalData, structure);
+            boolean->finishCreation(globalData);
+            return boolean;
+        }
+        
         static const ClassInfo s_info;
         
-        static Structure* createStructure(JSGlobalData& globalData, JSValue prototype)
+        static Structure* createStructure(JSGlobalData& globalData, JSGlobalObject* globalObject, JSValue prototype)
         {
-            return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
+            return Structure::create(globalData, globalObject, prototype, TypeInfo(ObjectType, StructureFlags), &s_info);
         }
     };