diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/3rdparty/javascriptcore/JavaScriptCore/runtime/Executable.h | 2 | ||||
-rw-r--r-- | src/script/api/qscriptengine.cpp | 2 |
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; |