]> git.saurik.com Git - apple/javascriptcore.git/blobdiff - runtime/NativeErrorConstructor.h
JavaScriptCore-903.5.tar.gz
[apple/javascriptcore.git] / runtime / NativeErrorConstructor.h
index 152dbac2f5a72647ab5e9893587154aa0e4961b8..4fb16f1a382e8b4c66119516282fb1687732f5e4 100644 (file)
@@ -31,19 +31,24 @@ namespace JSC {
 
     class NativeErrorConstructor : public InternalFunction {
     public:
 
     class NativeErrorConstructor : public InternalFunction {
     public:
-        NativeErrorConstructor(ExecState*, NonNullPassRefPtr<Structure>, NativeErrorPrototype*);
+        NativeErrorConstructor(ExecState*, JSGlobalObject*, Structure*, Structure* prototypeStructure, const UString&);
 
 
-        static const ClassInfo info;
+        static const ClassInfo s_info;
 
 
-        ErrorInstance* construct(ExecState*, const ArgList&);
+        static Structure* createStructure(JSGlobalData& globalData, JSValue prototype)
+        {
+            return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
+        }
+
+        Structure* errorStructure() { return m_errorStructure.get(); }
 
     private:
 
     private:
+        static const unsigned StructureFlags = OverridesVisitChildren | InternalFunction::StructureFlags;
         virtual ConstructType getConstructData(ConstructData&);
         virtual CallType getCallData(CallData&);
         virtual ConstructType getConstructData(ConstructData&);
         virtual CallType getCallData(CallData&);
+        virtual void visitChildren(SlotVisitor&);
 
 
-        virtual const ClassInfo* classInfo() const { return &info; }
-
-        RefPtr<Structure> m_errorStructure;
+        WriteBarrier<Structure> m_errorStructure;
     };
 
 } // namespace JSC
     };
 
 } // namespace JSC