Showing the changes to libraries/script-engine/src/ScriptEngine.cpp (1 of 1 file). Show all
Unified · Split
| @@ -221,7 +221,8 @@ void ScriptEngine::waitTillDoneRunning() { · 220 unmodified lines | |||
| 221 | auto elapsed = stillWaiting - startedWaiting; | 221 | auto elapsed = stillWaiting - startedWaiting; |
| 222 | 222 | ||
| 223 | // if we've been waiting a second or more, then tell the script engine to stop evaluating | 223 | // 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) { | ||
| 225 | qCDebug(scriptengine) << "Script " << scriptName << " has been running too long [" << elapsed << "] aborting evaluation."; | 226 | qCDebug(scriptengine) << "Script " << scriptName << " has been running too long [" << elapsed << "] aborting evaluation."; |
| 226 | threadSafeAbortEvaluation(); | 227 | threadSafeAbortEvaluation(); |
| 227 | } | 228 | } |