Showing the changes to libraries/script-engine/src/ScriptManager.cpp (1 of 4 files). Show all
Unified · Split
| @@ -432,17 +432,18 @@ void ScriptManager::waitTillDoneRunning(bool shutdown) { · 431 unmodified lines | ||
| 432 | 432 | while (workerThread->isRunning()) { |
| 433 | 433 | // If the final evaluation takes too long, then tell the script engine to stop running |
| 434 | 434 | auto elapsedUsecs = usecTimestampNow() - startedWaiting; |
| 435 | + // V8TODO: temporarily increased script timeout. Maybe use different timeouts for release and unoptimized debug? | |
| 435 | 436 | static const auto MAX_SCRIPT_EVALUATION_TIME = USECS_PER_SECOND; |
| 436 | 437 | if (elapsedUsecs > MAX_SCRIPT_EVALUATION_TIME) { |
| 437 | 438 | workerThread->quit(); |
| 438 | 439 | |
| 439 | 440 | if (_engine->isEvaluating()) { |
| 440 | − qCWarning(scriptengine) << "Script Engine has been running too long, aborting:" << getFilename(); | |
| 441 | + qCWarning(scriptengine) << "Script Engine has been running too long (evaluation), aborting:" << getFilename(); | |
| 441 | 442 | _engine->abortEvaluation(); |
| 442 | 443 | } else { |
| 443 | 444 | auto context = _engine->currentContext(); |
| 444 | 445 | if (context) { |
| 445 | − qCWarning(scriptengine) << "Script Engine has been running too long, throwing:" << getFilename(); | |
| 446 | + qCWarning(scriptengine) << "Script Engine has been running too long (event loop), throwing:" << getFilename(); | |
| 446 | 447 | context->throwError("Timed out during shutdown"); |
| 447 | 448 | } |
| 448 | 449 | } |
| @@ -451,6 +452,7 @@ void ScriptManager::waitTillDoneRunning(bool shutdown) { · 2 unmodified lines | ||
| 451 | 452 | // flooding it with aborts/exceptions will persist it longer |
| 452 | 453 | static const auto MAX_SCRIPT_QUITTING_TIME = 0.5 * MSECS_PER_SECOND; |
| 453 | 454 | if (!workerThread->wait(MAX_SCRIPT_QUITTING_TIME)) { |
| 455 | + Q_ASSERT(false); | |
| 454 | 456 | workerThread->terminate(); |
| 455 | 457 | } |
| 456 | 458 | } |