From 7a647e8c9efbbd46184bc4714159c82ae26be958 Mon Sep 17 00:00:00 2001 From: Jedrzej Nowacki Date: Mon, 19 Oct 2009 12:40:38 +0200 Subject: 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 --- src/script/api/qscriptengineagent.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/script/api/qscriptengineagent.cpp') diff --git a/src/script/api/qscriptengineagent.cpp b/src/script/api/qscriptengineagent.cpp index bc2eea2b0e..0ca7ecc4e8 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) -- cgit v1.2.1