/Tests/CheckCompilerRelatedVariables/

.
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKent Hansen <kent.hansen@nokia.com>2011-03-01 08:43:48 (GMT)
committerKent Hansen <kent.hansen@nokia.com>2011-03-01 09:21:49 (GMT)
commit2699e8dae2b160f8d001459a7993b61fe4b1fac3 (patch)
treeb049ef66379e511bed38cde106a3682b0d43548e
parent5c7b7f5fca8c557b14959ca338cb2fa62aea6aa0 (diff)
downloadQt-2699e8dae2b160f8d001459a7993b61fe4b1fac3.zip
Qt-2699e8dae2b160f8d001459a7993b61fe4b1fac3.tar.gz
Qt-2699e8dae2b160f8d001459a7993b61fe4b1fac3.tar.bz2
Don't assert in abortEvaluation() autotest
When QtScript is built without NDEBUG defined, the tst_QScriptEngine::abortEvaluation() test would assert. This was due to commit 716e0284c8f569d71e42354fd6fc3b965233e019, which fixed the tst_QScriptEngine::throwErrorFromProcessEvents() autotest for a script containing an infinite while-loop with an empty body. The CHECK_FOR_EXCEPTION_AT_END() that we added should only be done if the timeout checker did not report a timeout; otherwise the JSC state becomes corrupted due to returnToThrowTrampoline() being called twice. This caused an assert later when calculating the line number of the exception. Also add test cases for scripts with try-catch statements. For abortEvaluation(), scripts should not be able to observe (i.e. catch) the interrupted exception, but if an error is thrown using QScriptContext::throwError(), the script should be able to catch it. Task-number: QTBUG-17854 Reviewed-by: Olivier Goffart