History

Attempt to fix crash from script running too late

sabrina-shanman committed 7 years ago

Commit 67a06b31 parent 43cd5431 file · +6 −0Browse 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+6−0
@@ -422,6 +422,12 @@ void ScriptEngine::waitTillDoneRunning() { · 421 unmodified lines
422422 if (isEvaluating()) {
423423 qCWarning(scriptengine) << "Script Engine has been running too long, aborting:" << getFilename();
424424 abortEvaluation();
425+ } else {
426+ qCWarning(scriptengine) << "Script Engine has been running too long, throwing:" << getFilename();
427+ auto context = currentContext();
428+ if (context) {
429+ context->throwError("Timed out during shutdown");
430+ }
425431 }
426432
427433 // Wait for the scripting thread to stop running, as