X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/81345200c95645a1b0d2635520f96ad55dfde63f..refs/heads/master:/debugger/DebuggerCallFrame.h diff --git a/debugger/DebuggerCallFrame.h b/debugger/DebuggerCallFrame.h index ca22569..aa3cca5 100644 --- a/debugger/DebuggerCallFrame.h +++ b/debugger/DebuggerCallFrame.h @@ -29,26 +29,32 @@ #ifndef DebuggerCallFrame_h #define DebuggerCallFrame_h -#include "CallFrame.h" #include "DebuggerPrimitives.h" +#include "Strong.h" +#include #include #include #include namespace JSC { +class DebuggerScope; +class Exception; +class ExecState; +typedef ExecState CallFrame; + class DebuggerCallFrame : public RefCounted { public: enum Type { ProgramType, FunctionType }; - static PassRefPtr create(CallFrame* callFrame) + static Ref create(CallFrame* callFrame) { - return adoptRef(new DebuggerCallFrame(callFrame)); + return adoptRef(*new DebuggerCallFrame(callFrame)); } JS_EXPORT_PRIVATE explicit DebuggerCallFrame(CallFrame*); - JS_EXPORT_PRIVATE PassRefPtr callerFrame(); + JS_EXPORT_PRIVATE RefPtr callerFrame(); ExecState* exec() const { return m_callFrame; } JS_EXPORT_PRIVATE SourceID sourceID() const; @@ -58,11 +64,11 @@ public: JS_EXPORT_PRIVATE const TextPosition& position() const { return m_position; } JS_EXPORT_PRIVATE JSGlobalObject* vmEntryGlobalObject() const; - JS_EXPORT_PRIVATE JSScope* scope() const; + JS_EXPORT_PRIVATE DebuggerScope* scope(); JS_EXPORT_PRIVATE String functionName() const; JS_EXPORT_PRIVATE Type type() const; JS_EXPORT_PRIVATE JSValue thisValue() const; - JSValue evaluate(const String&, JSValue& exception); + JSValue evaluate(const String&, NakedPtr&); bool isValid() const { return !!m_callFrame; } JS_EXPORT_PRIVATE void invalidate(); @@ -78,6 +84,9 @@ private: CallFrame* m_callFrame; RefPtr m_caller; TextPosition m_position; + // The DebuggerPausedScope is responsible for calling invalidate() which, + // in turn, will clear this strong ref. + Strong m_scope; }; } // namespace JSC