]> git.saurik.com Git - apple/javascriptcore.git/blobdiff - runtime/JSWrapperObject.h
JavaScriptCore-1097.13.tar.gz
[apple/javascriptcore.git] / runtime / JSWrapperObject.h
index 89726486584f40753525a5d9a8201480c73d01f3..65b4bdb7f61e00011152e1a0d5ace1eab777d97a 100644 (file)
@@ -29,24 +29,24 @@ namespace JSC {
     // This class is used as a base for classes such as String,
     // Number, Boolean and Date which are wrappers for primitive types.
     class JSWrapperObject : public JSNonFinalObject {
-    protected:
-        explicit JSWrapperObject(JSGlobalData&, Structure*);
-
     public:
+        typedef JSNonFinalObject Base;
+
         JSValue internalValue() const;
         void setInternalValue(JSGlobalData&, JSValue);
 
-        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);
         }
 
     protected:
+        explicit JSWrapperObject(JSGlobalData&, Structure*);
         static const unsigned StructureFlags = OverridesVisitChildren | JSNonFinalObject::StructureFlags;
 
+        static void visitChildren(JSCell*, SlotVisitor&);
+
     private:
-        virtual void visitChildren(SlotVisitor&);
-        
         WriteBarrier<Unknown> m_internalValue;
     };