summaryrefslogtreecommitdiffstats
path: root/src/script/api/qscriptengineagent.cpp
diff options
context:
space:
mode:
authorJedrzej Nowacki <jedrzej.nowacki@nokia.com>2009-10-19 10:40:38 (GMT)
committerJedrzej Nowacki <jedrzej.nowacki@nokia.com>2009-10-19 11:40:35 (GMT)
commit7a647e8c9efbbd46184bc4714159c82ae26be958 (patch)
tree1334c6e793b3cc84c669bbb78b1de26a1574ed18 /src/script/api/qscriptengineagent.cpp
parentf9e46cdb2d9a42d52f90fe50a53a76c03065b9ce (diff)
downloadQt-7a647e8c9efbbd46184bc4714159c82ae26be958.zip
Qt-7a647e8c9efbbd46184bc4714159c82ae26be958.tar.gz
Qt-7a647e8c9efbbd46184bc4714159c82ae26be958.tar.bz2
Regression fix. Fix the hasUncaughtException() flag in debugger's event.
The QScriptEngine::hasUncaughtException() flag should be set to true if returning from a JS function was caused by an exception. According to documentation, the flag had to be accessible from the QScriptEngineAgent::functionExit event. New autotest was added. Reviewed-by: Kent Hansen
Diffstat (limited to 'src/script/api/qscriptengineagent.cpp')
-rw-r--r--src/script/api/qscriptengineagent.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/script/api/qscriptengineagent.cpp b/src/script/api/qscriptengineagent.cpp
index bc2eea2..0ca7ecc 100644
--- a/src/script/api/qscriptengineagent.cpp
+++ b/src/script/api/qscriptengineagent.cpp
@@ -156,6 +156,7 @@ void QScriptEngineAgentPrivate::exceptionThrow(const JSC::DebuggerCallFrame& fra
QScriptValue value(engine->scriptValueFromJSCValue(frame.exception()));
q_ptr->exceptionThrow(sourceID, value, hasHandler);
engine->currentFrame = oldFrame;
+ engine->setCurrentException(value);
};
void QScriptEngineAgentPrivate::exceptionCatch(const JSC::DebuggerCallFrame& frame, intptr_t sourceID)
@@ -165,6 +166,7 @@ void QScriptEngineAgentPrivate::exceptionCatch(const JSC::DebuggerCallFrame& fra
QScriptValue value(engine->scriptValueFromJSCValue(frame.exception()));
q_ptr->exceptionCatch(sourceID, value);
engine->currentFrame = oldFrame;
+ engine->clearCurrentException();
}
void QScriptEngineAgentPrivate::atStatement(const JSC::DebuggerCallFrame& frame, intptr_t sourceID, int lineno, int column)