Showing the changes to libraries/script-engine/src/ScriptManager.cpp (1 of 3 files). Show all
Unified · Split
| @@ -394,6 +394,7 @@ void ScriptManager::runInThread() { · 393 unmodified lines | |||
| 394 | workerThread->setObjectName(name); | 394 | workerThread->setObjectName(name); |
| 395 | _engine->setThread(workerThread); | 395 | _engine->setThread(workerThread); |
| 396 | moveToThread(workerThread); | 396 | moveToThread(workerThread); |
| 397 | _assetScriptingInterface->moveToThread(workerThread); | ||
| 397 | 398 | ||
| 398 | // NOTE: If you connect any essential signals for proper shutdown or cleanup of | 399 | // NOTE: If you connect any essential signals for proper shutdown or cleanup of |
| 399 | // the script engine, make sure to add code to "reconnect" them to the | 400 | // the script engine, make sure to add code to "reconnect" them to the |
| @@ -884,10 +885,9 @@ void ScriptManager::run() { · 484 unmodified lines | |||
| 884 | hifi::scripting::setLocalAccessSafeThread(true); | 885 | hifi::scripting::setLocalAccessSafeThread(true); |
| 885 | } | 886 | } |
| 886 | 887 | ||
| 887 | 888 | if (QThread::currentThread() != _assetScriptingInterface->thread()) { | |
| 888 | //_engine->enterIsolateOnThisThread(); | 889 | _assetScriptingInterface->moveToThread(QThread::currentThread()); |
| 889 | 890 | } | |
| 890 | _engine->compileTest(); | ||
| 891 | 891 | ||
| 892 | auto filenameParts = _fileNameString.split("/"); | 892 | auto filenameParts = _fileNameString.split("/"); |
| 893 | auto name = filenameParts.size() > 0 ? filenameParts[filenameParts.size() - 1] : "unknown"; | 893 | auto name = filenameParts.size() > 0 ? filenameParts[filenameParts.size() - 1] : "unknown"; |