#ifndef DebuggerCallFrame_h
#define DebuggerCallFrame_h
-#include "CallFrame.h"
#include "DebuggerPrimitives.h"
+#include "Strong.h"
+#include <wtf/NakedPtr.h>
#include <wtf/PassRefPtr.h>
#include <wtf/RefCounted.h>
#include <wtf/text/TextPosition.h>
namespace JSC {
+class DebuggerScope;
+class Exception;
+class ExecState;
+typedef ExecState CallFrame;
+
class DebuggerCallFrame : public RefCounted<DebuggerCallFrame> {
public:
enum Type { ProgramType, FunctionType };
- static PassRefPtr<DebuggerCallFrame> create(CallFrame* callFrame)
+ static Ref<DebuggerCallFrame> create(CallFrame* callFrame)
{
- return adoptRef(new DebuggerCallFrame(callFrame));
+ return adoptRef(*new DebuggerCallFrame(callFrame));
}
JS_EXPORT_PRIVATE explicit DebuggerCallFrame(CallFrame*);
- JS_EXPORT_PRIVATE PassRefPtr<DebuggerCallFrame> callerFrame();
+ JS_EXPORT_PRIVATE RefPtr<DebuggerCallFrame> callerFrame();
ExecState* exec() const { return m_callFrame; }
JS_EXPORT_PRIVATE SourceID sourceID() const;
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<Exception>&);
bool isValid() const { return !!m_callFrame; }
JS_EXPORT_PRIVATE void invalidate();
CallFrame* m_callFrame;
RefPtr<DebuggerCallFrame> m_caller;
TextPosition m_position;
+ // The DebuggerPausedScope is responsible for calling invalidate() which,
+ // in turn, will clear this strong ref.
+ Strong<DebuggerScope> m_scope;
};
} // namespace JSC