summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2014-03-24 16:07:53 +0100
committerFrederik Gladhorn <frederik.gladhorn@digia.com>2014-03-24 16:07:53 +0100
commit712ecdac9edfaacf3e3b1a419bec1fda548d8316 (patch)
tree67e237ee1f465230c0c53cb7b3bcbc4e3962e9e6
parent08e11e15bd50c6f6b97e797c8d4f2d65ffa85734 (diff)
parent08d9ef715265d33f4cf04693b0787fd75994dc42 (diff)
downloadqtscript-712ecdac9edfaacf3e3b1a419bec1fda548d8316.tar.gz
Merge remote-tracking branch 'origin/stable' into dev
Change-Id: If040ed0b558c5df926a8c7cd1041192f74ac7f4d
-rw-r--r--src/3rdparty/javascriptcore/JavaScriptCore/runtime/Executable.h2
-rw-r--r--src/script/api/qscriptengine.cpp2
2 files changed, 3 insertions, 1 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)); }
diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp
index 6972ddb..aa5825f 100644
--- a/src/script/api/qscriptengine.cpp
+++ b/src/script/api/qscriptengine.cpp
@@ -1366,7 +1366,7 @@ JSC::JSValue QScriptEnginePrivate::evaluateHelper(JSC::ExecState *exec, intptr_t
q->clearExceptions();
JSC::DynamicGlobalObjectScope dynamicGlobalObjectScope(exec, exec->scopeChain()->globalObject);
- if (compile) {
+ if (compile && !executable->isCompiled()) {
JSC::JSObject* error = executable->compile(exec, exec->scopeChain());
if (error) {
compile = false;