- int errLine;
- UString errMsg;
- SourceCode source = makeSource(script);
- RefPtr<EvalNode> evalNode = m_callFrame->scopeChain()->globalData->parser->parse<EvalNode>(m_callFrame, m_callFrame->dynamicGlobalObject()->debugger(), source, &errLine, &errMsg);
- if (!evalNode)
- return Error::create(m_callFrame, SyntaxError, errMsg, errLine, source.provider()->asID(), source.provider()->url());
+void DebuggerCallFrame::invalidate()
+{
+ m_callFrame = nullptr;
+ RefPtr<DebuggerCallFrame> frame = m_caller.release();
+ while (frame) {
+ frame->m_callFrame = nullptr;
+ frame = frame->m_caller.release();
+ }
+}
+
+TextPosition DebuggerCallFrame::positionForCallFrame(CallFrame* callFrame)
+{
+ if (!callFrame)
+ return TextPosition();
+
+ LineAndColumnFunctor functor;
+ callFrame->iterate(functor);
+ return TextPosition(OrdinalNumber::fromOneBasedInt(functor.line()), OrdinalNumber::fromOneBasedInt(functor.column()));
+}
+
+SourceID DebuggerCallFrame::sourceIDForCallFrame(CallFrame* callFrame)
+{
+ ASSERT(callFrame);
+ CodeBlock* codeBlock = callFrame->codeBlock();
+ if (!codeBlock)
+ return noSourceID;
+ return codeBlock->ownerExecutable()->sourceID();
+}
+
+JSValue DebuggerCallFrame::thisValueForCallFrame(CallFrame* callFrame)
+{
+ if (!callFrame)
+ return jsNull();