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