X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/f9bf01c6616d5ddcf65b13b33cedf9e387ff7a63..217a6308cd6a1dc049a0bb69263bd4c91f91c4d0:/debugger/DebuggerActivation.h?ds=sidebyside diff --git a/debugger/DebuggerActivation.h b/debugger/DebuggerActivation.h index 3927017..a33d6dd 100644 --- a/debugger/DebuggerActivation.h +++ b/debugger/DebuggerActivation.h @@ -30,35 +30,42 @@ namespace JSC { - class JSActivation; - - class DebuggerActivation : public JSObject { + class DebuggerActivation : public JSNonFinalObject { public: - DebuggerActivation(JSObject*); + typedef JSNonFinalObject Base; + + static DebuggerActivation* create(VM& vm, JSObject* object) + { + DebuggerActivation* activation = new (NotNull, allocateCell(vm.heap)) DebuggerActivation(vm); + activation->finishCreation(vm, object); + return activation; + } + + static void visitChildren(JSCell*, SlotVisitor&); + static String className(const JSObject*); + static bool getOwnPropertySlot(JSCell*, ExecState*, PropertyName, PropertySlot&); + static void put(JSCell*, ExecState*, PropertyName, JSValue, PutPropertySlot&); + static void putDirectVirtual(JSObject*, ExecState*, PropertyName, JSValue, unsigned attributes); + static bool deleteProperty(JSCell*, ExecState*, PropertyName); + static void getOwnPropertyNames(JSObject*, ExecState*, PropertyNameArray&, EnumerationMode); + static bool getOwnPropertyDescriptor(JSObject*, ExecState*, PropertyName, PropertyDescriptor&); + static bool defineOwnProperty(JSObject*, ExecState*, PropertyName, PropertyDescriptor&, bool shouldThrow); - virtual void markChildren(MarkStack&); - virtual UString className() const; - virtual bool getOwnPropertySlot(ExecState*, const Identifier& propertyName, PropertySlot&); - virtual void put(ExecState*, const Identifier& propertyName, JSValue, PutPropertySlot&); - virtual void putWithAttributes(ExecState*, const Identifier& propertyName, JSValue, unsigned attributes); - virtual bool deleteProperty(ExecState*, const Identifier& propertyName); - virtual void getOwnPropertyNames(ExecState*, PropertyNameArray&, EnumerationMode mode = ExcludeDontEnumProperties); - virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&); - virtual void defineGetter(ExecState*, const Identifier& propertyName, JSObject* getterFunction, unsigned attributes); - virtual void defineSetter(ExecState*, const Identifier& propertyName, JSObject* setterFunction, unsigned attributes); - virtual JSValue lookupGetter(ExecState*, const Identifier& propertyName); - virtual JSValue lookupSetter(ExecState*, const Identifier& propertyName); + JS_EXPORTDATA static const ClassInfo s_info; - static PassRefPtr createStructure(JSValue prototype) + static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype) { - return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount); + return Structure::create(vm, globalObject, prototype, TypeInfo(ObjectType, StructureFlags), &s_info); } protected: - static const unsigned StructureFlags = OverridesGetOwnPropertySlot | OverridesMarkChildren | JSObject::StructureFlags; + static const unsigned StructureFlags = OverridesGetOwnPropertySlot | OverridesVisitChildren | JSObject::StructureFlags; + + JS_EXPORT_PRIVATE void finishCreation(VM&, JSObject* activation); private: - JSActivation* m_activation; + JS_EXPORT_PRIVATE DebuggerActivation(VM&); + WriteBarrier m_activation; }; } // namespace JSC