+ if (!callFrame->codeBlock())
+ return JSValue();
+
+ VM& vm = callFrame->vm();
+ EvalExecutable* eval = EvalExecutable::create(callFrame, makeSource(script), callFrame->codeBlock()->isStrictMode());
+ if (vm.exception()) {
+ exception = vm.exception();
+ vm.clearException();
+ return jsUndefined();
+ }
+
+ JSValue thisValue = thisValueForCallFrame(callFrame);
+ JSValue result = vm.interpreter->execute(eval, callFrame, thisValue, scope());
+ if (vm.exception()) {
+ exception = vm.exception();
+ vm.clearException();
+ }
+ ASSERT(result);
+ return result;
+}
+
+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()));