X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/ba379fdc102753d6be2c4d937058fe40257329fe..a253471d7f8e4d91bf6ebabab00155c3b387d3d0:/debugger/DebuggerActivation.h diff --git a/debugger/DebuggerActivation.h b/debugger/DebuggerActivation.h index 9e1f9f5..6560c3d 100644 --- a/debugger/DebuggerActivation.h +++ b/debugger/DebuggerActivation.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008 Apple Inc. All rights reserved. + * Copyright (C) 2008, 2009 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -30,32 +30,42 @@ namespace JSC { - class JSActivation; - - class DebuggerActivation : public JSObject { + class DebuggerActivation : public JSNonFinalObject { public: - DebuggerActivation(JSObject*); - - virtual void mark(); - 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 getPropertyNames(ExecState*, PropertyNameArray&); - virtual bool getPropertyAttributes(ExecState*, const Identifier& propertyName, unsigned& attributes) const; - virtual void defineGetter(ExecState*, const Identifier& propertyName, JSObject* getterFunction); - virtual void defineSetter(ExecState*, const Identifier& propertyName, JSObject* setterFunction); - virtual JSValue lookupGetter(ExecState*, const Identifier& propertyName); - virtual JSValue lookupSetter(ExecState*, const Identifier& propertyName); - - static PassRefPtr createStructure(JSValue prototype) + typedef JSNonFinalObject Base; + + static DebuggerActivation* create(JSGlobalData& globalData, JSObject* object) { - return Structure::create(prototype, TypeInfo(ObjectType)); + DebuggerActivation* activation = new (NotNull, allocateCell(globalData.heap)) DebuggerActivation(globalData); + activation->finishCreation(globalData, object); + return activation; } + static void visitChildren(JSCell*, SlotVisitor&); + static UString className(const JSObject*); + static bool getOwnPropertySlot(JSCell*, ExecState*, const Identifier& propertyName, PropertySlot&); + static void put(JSCell*, ExecState*, const Identifier& propertyName, JSValue, PutPropertySlot&); + static void putDirectVirtual(JSObject*, ExecState*, const Identifier& propertyName, JSValue, unsigned attributes); + static bool deleteProperty(JSCell*, ExecState*, const Identifier& propertyName); + static void getOwnPropertyNames(JSObject*, ExecState*, PropertyNameArray&, EnumerationMode); + static bool getOwnPropertyDescriptor(JSObject*, ExecState*, const Identifier&, PropertyDescriptor&); + static bool defineOwnProperty(JSObject*, ExecState*, const Identifier& propertyName, PropertyDescriptor&, bool shouldThrow); + + JS_EXPORTDATA static const ClassInfo s_info; + + static Structure* createStructure(JSGlobalData& globalData, JSGlobalObject* globalObject, JSValue prototype) + { + return Structure::create(globalData, globalObject, prototype, TypeInfo(ObjectType, StructureFlags), &s_info); + } + + protected: + static const unsigned StructureFlags = OverridesGetOwnPropertySlot | OverridesVisitChildren | JSObject::StructureFlags; + + JS_EXPORT_PRIVATE void finishCreation(JSGlobalData&, JSObject* activation); + private: - JSActivation* m_activation; + JS_EXPORT_PRIVATE DebuggerActivation(JSGlobalData&); + WriteBarrier m_activation; }; } // namespace JSC