History

more CR feedback removed redundant abort code

ZappoMan committed 10 years ago

Commit 6026e051 parent 00838d11 file · +2 −1Browse files

Showing the changes to libraries/script-engine/src/ScriptEngine.cpp (1 of 1 file). Show all

Unified · Split

libraries/script-engine/src/ScriptEngine.cpp+2−1
@@ -221,7 +221,8 @@ void ScriptEngine::waitTillDoneRunning() { · 220 unmodified lines
221221 auto elapsed = stillWaiting - startedWaiting;
222222
223223 // if we've been waiting a second or more, then tell the script engine to stop evaluating
224− if (elapsed > USECS_PER_SECOND) {
224+ static const auto MAX_SCRIPT_EVALUATION_TIME = USECS_PER_SECOND;
225+ if (elapsed > MAX_SCRIPT_EVALUATION_TIME) {
225226 qCDebug(scriptengine) << "Script " << scriptName << " has been running too long [" << elapsed << "] aborting evaluation.";
226227 threadSafeAbortEvaluation();
227228 }