diff options
author | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2009-09-30 06:37:33 (GMT) |
---|---|---|
committer | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2009-09-30 06:37:33 (GMT) |
commit | 828b776f0a9ff84288e6be1bbbdb91448ca1bd4d (patch) | |
tree | ce4419b9c72a9a53c3ad3de9568b9cc89f9cf0bf /src/3rdparty/webkit/JavaScriptCore/debugger/DebuggerCallFrame.cpp | |
parent | 3c3745c29d9fbae98b55a88b5ebccb0b29b4eed5 (diff) | |
parent | b83ea4276a242893c01586a5f1a2d62d54369cfa (diff) | |
download | Qt-828b776f0a9ff84288e6be1bbbdb91448ca1bd4d.zip Qt-828b776f0a9ff84288e6be1bbbdb91448ca1bd4d.tar.gz Qt-828b776f0a9ff84288e6be1bbbdb91448ca1bd4d.tar.bz2 |
Merge branch '4.6' of git@scm.dev.troll.no:qt/qt into 4.6
Diffstat (limited to 'src/3rdparty/webkit/JavaScriptCore/debugger/DebuggerCallFrame.cpp')
-rw-r--r-- | src/3rdparty/webkit/JavaScriptCore/debugger/DebuggerCallFrame.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/3rdparty/webkit/JavaScriptCore/debugger/DebuggerCallFrame.cpp b/src/3rdparty/webkit/JavaScriptCore/debugger/DebuggerCallFrame.cpp index cd8702b..88b14e6 100644 --- a/src/3rdparty/webkit/JavaScriptCore/debugger/DebuggerCallFrame.cpp +++ b/src/3rdparty/webkit/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(m_callFrame, 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 |