summaryrefslogtreecommitdiffstats
path: root/JavaScriptCore/debugger/DebuggerCallFrame.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'JavaScriptCore/debugger/DebuggerCallFrame.cpp')
-rw-r--r--JavaScriptCore/debugger/DebuggerCallFrame.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/JavaScriptCore/debugger/DebuggerCallFrame.cpp b/JavaScriptCore/debugger/DebuggerCallFrame.cpp
index f2afba6..cd8702b 100644
--- a/JavaScriptCore/debugger/DebuggerCallFrame.cpp
+++ b/JavaScriptCore/debugger/DebuggerCallFrame.cpp
@@ -41,7 +41,7 @@ const UString* DebuggerCallFrame::functionName() const
if (!m_callFrame->codeBlock())
return 0;
- JSFunction* function = asFunction(m_callFrame->callee());
+ JSFunction* function = static_cast<JSFunction*>(m_callFrame->callee());
if (!function)
return 0;
return &function->name(&m_callFrame->globalData());
@@ -52,7 +52,7 @@ UString DebuggerCallFrame::calculatedFunctionName() const
if (!m_callFrame->codeBlock())
return 0;
- JSFunction* function = asFunction(m_callFrame->callee());
+ JSFunction* function = static_cast<JSFunction*>(m_callFrame->callee());
if (!function)
return 0;
return function->calculatedDisplayName(&m_callFrame->globalData());
@@ -79,12 +79,14 @@ JSValue DebuggerCallFrame::evaluate(const UString& script, JSValue& exception) c
if (!m_callFrame->codeBlock())
return JSValue();
- EvalExecutable eval(makeSource(script));
- JSObject* error = eval.parse(m_callFrame);
- if (error)
- return error;
+ 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());
- return m_callFrame->scopeChain()->globalData->interpreter->execute(&eval, m_callFrame, thisObject(), m_callFrame->scopeChain(), &exception);
+ return m_callFrame->scopeChain()->globalData->interpreter->execute(evalNode.get(), m_callFrame, thisObject(), m_callFrame->scopeChain(), &exception);
}
} // namespace JSC