Fix recursive calling of QScriptProgram v5.3.0 v5.3.0-beta1 v5.3.0-rc1
authorLars Knoll <lars.knoll@digia.com>
Tue, 11 Mar 2014 08:18:17 +0000 (09:18 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Tue, 11 Mar 2014 08:27:13 +0000 (09:27 +0100)
commit08d9ef715265d33f4cf04693b0787fd75994dc42
tree191459fb83a6c8d2cf46bb8b25e3753393411dad
parent81993bab2cb1d37af4b9893ff10305920069b9e6
Fix recursive calling of QScriptProgram

The first time a QScriptProgram is evaluated, it gets compiled and
then executed. If the execution would somehow trigger another
evaluation of the script program, it would run into the compile
stage again (even though it already was compiled), and then trigger
and assertion in debug mode (or leak memory in release builds).

Task-number: QTBUG-37317
Change-Id: I83e7efd5f238d021e200258826e2e4a9520c3a7d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
src/3rdparty/javascriptcore/JavaScriptCore/runtime/Executable.h
src/script/api/qscriptengine.cpp