JavaScriptCallFrame.h [plain text]
#ifndef JavaScriptCallFrame_h
#define JavaScriptCallFrame_h
#if ENABLE(INSPECTOR)
#include "JSCJSValueInlines.h"
#include "debugger/DebuggerCallFrame.h"
#include "interpreter/CallFrame.h"
#include <wtf/Forward.h>
#include <wtf/PassRefPtr.h>
#include <wtf/RefCounted.h>
#include <wtf/text/TextPosition.h>
namespace Inspector {
class JavaScriptCallFrame : public RefCounted<JavaScriptCallFrame> {
public:
static PassRefPtr<JavaScriptCallFrame> create(PassRefPtr<JSC::DebuggerCallFrame> debuggerCallFrame)
{
return adoptRef(new JavaScriptCallFrame(debuggerCallFrame));
}
JavaScriptCallFrame* caller();
intptr_t sourceID() const { return m_debuggerCallFrame->sourceID(); }
const TextPosition position() const { return m_debuggerCallFrame->position(); }
int line() const { return m_debuggerCallFrame->line(); }
int column() const { return m_debuggerCallFrame->column(); }
String functionName() const { return m_debuggerCallFrame->functionName(); }
JSC::DebuggerCallFrame::Type type() const { return m_debuggerCallFrame->type(); }
JSC::JSScope* scopeChain() const { return m_debuggerCallFrame->scope(); }
JSC::JSGlobalObject* vmEntryGlobalObject() const { return m_debuggerCallFrame->vmEntryGlobalObject(); }
JSC::JSValue thisValue() const { return m_debuggerCallFrame->thisValue(); }
JSC::JSValue evaluate(const String& script, JSC::JSValue& exception) const { return m_debuggerCallFrame->evaluate(script, exception); }
private:
JavaScriptCallFrame(PassRefPtr<JSC::DebuggerCallFrame>);
RefPtr<JSC::DebuggerCallFrame> m_debuggerCallFrame;
RefPtr<JavaScriptCallFrame> m_caller;
};
}
#endif // ENABLE(INSPECTOR)
#endif // JavaScriptCallFrame_h