diff options
author | Kent Hansen <khansen@trolltech.com> | 2009-08-04 15:35:45 (GMT) |
---|---|---|
committer | Kent Hansen <khansen@trolltech.com> | 2009-08-04 15:35:45 (GMT) |
commit | 175b1689c9e173db62eb5612c7076531354e5252 (patch) | |
tree | daef8b1350e4adfa6f770460acc303d59037db74 /src/script/api/qscriptengine.cpp | |
parent | 7025e0d29b653b575ad28556c9b78f7a8e040b49 (diff) | |
download | Qt-175b1689c9e173db62eb5612c7076531354e5252.zip Qt-175b1689c9e173db62eb5612c7076531354e5252.tar.gz Qt-175b1689c9e173db62eb5612c7076531354e5252.tar.bz2 |
clear abort flag when we start a new evaluate
Otherwise evaluate() would _always_ return the value previously
passed to abortEvaluation(), once a script had been aborted.
Diffstat (limited to 'src/script/api/qscriptengine.cpp')
-rw-r--r-- | src/script/api/qscriptengine.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp index 179a49f..3378da9 100644 --- a/src/script/api/qscriptengine.cpp +++ b/src/script/api/qscriptengine.cpp @@ -2150,6 +2150,7 @@ QScriptValue QScriptEngine::evaluate(const QString &program, const QString &file JSC::JSValue thisValue = d->thisForContext(exec); JSC::JSObject* thisObject = (!thisValue || thisValue.isUndefinedOrNull()) ? exec->dynamicGlobalObject() : thisValue.toObject(exec); JSC::JSValue exceptionValue; + dynamic_cast<QScript::TimeoutCheckerProxy*>(d->globalData->timeoutChecker)->setShouldAbort(false); JSC::JSValue result = exec->interpreter()->execute(evalNode.get(), exec, thisObject, exec->scopeChain(), &exceptionValue); if (dynamic_cast<QScript::TimeoutCheckerProxy*>(d->globalData->timeoutChecker)->shouldAbort()) { |