diff options
Diffstat (limited to 'src/script/api/qscriptengineagent.cpp')
-rw-r--r-- | src/script/api/qscriptengineagent.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/script/api/qscriptengineagent.cpp b/src/script/api/qscriptengineagent.cpp index 28905e8..c3d1566 100644 --- a/src/script/api/qscriptengineagent.cpp +++ b/src/script/api/qscriptengineagent.cpp @@ -117,6 +117,8 @@ void QScriptEngineAgentPrivate::attach() if (engine->originalGlobalObject()->debugger()) engine->originalGlobalObject()->setDebugger(0); JSC::Debugger::attach(engine->originalGlobalObject()); + if (!QScriptEnginePrivate::get(engine)->isEvaluating()) + JSC::Debugger::recompileAllJSFunctions(engine->globalData); } void QScriptEngineAgentPrivate::detach() @@ -134,9 +136,12 @@ void QScriptEngineAgentPrivate::returnEvent(const JSC::DebuggerCallFrame& frame, void QScriptEngineAgentPrivate::exceptionThrow(const JSC::DebuggerCallFrame& frame, intptr_t sourceID, bool hasHandler) { JSC::CallFrame *oldFrame = engine->currentFrame; + int oldAgentLineNumber = engine->agentLineNumber; engine->currentFrame = frame.callFrame(); QScriptValue value(engine->scriptValueFromJSCValue(frame.exception())); + engine->agentLineNumber = value.property(QLatin1String("lineNumber")).toInt32(); q_ptr->exceptionThrow(sourceID, value, hasHandler); + engine->agentLineNumber = oldAgentLineNumber; engine->currentFrame = oldFrame; engine->setCurrentException(value); }; |