summaryrefslogtreecommitdiffstats
path: root/src/3rdparty
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2014-03-11 08:18:17 (GMT)
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-13 16:18:26 (GMT)
commited45773caf76455bb737da3c0c4429f99c9a15ad (patch)
tree75e54966c0bd1737a6a628c7eaa8820ce4ccb051 /src/3rdparty
parent54491a2571669f0c232d2ab9926991ff9ecf3403 (diff)
downloadQt-ed45773caf76455bb737da3c0c4429f99c9a15ad.zip
Qt-ed45773caf76455bb737da3c0c4429f99c9a15ad.tar.gz
Qt-ed45773caf76455bb737da3c0c4429f99c9a15ad.tar.bz2
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). Backport of 08d9ef715265d33f4cf04693b0787fd75994dc42 from Qt 5. Task-number: QTBUG-37317 Change-Id: I83e7efd5f238d021e200258826e2e4a9520c3a7d Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/3rdparty')
-rw-r--r--src/3rdparty/javascriptcore/JavaScriptCore/runtime/Executable.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Executable.h b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Executable.h
index d1d38de..53945e8 100644
--- a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Executable.h
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Executable.h
@@ -172,6 +172,8 @@ namespace JSC {
JSObject* compile(ExecState*, ScopeChainNode*);
+ bool isCompiled() const { return m_evalCodeBlock; }
+
ExceptionInfo* reparseExceptionInfo(JSGlobalData*, ScopeChainNode*, CodeBlock*);
static PassRefPtr<EvalExecutable> create(ExecState* exec, const SourceCode& source) { return adoptRef(new EvalExecutable(exec, source)); }