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 | 394 | workerThread->setObjectName(name); |
| 395 | 395 | _engine->setThread(workerThread); |
| 396 | 396 | moveToThread(workerThread); |
| 397 | + _assetScriptingInterface->moveToThread(workerThread); | |
| 397 | 398 | |
| 398 | 399 | // NOTE: If you connect any essential signals for proper shutdown or cleanup of |
| 399 | 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 | 885 | hifi::scripting::setLocalAccessSafeThread(true); |
| 885 | 886 | } |
| 886 | 887 | |
| 887 | − | |
| 888 | − //_engine->enterIsolateOnThisThread(); | |
| 889 | − | |
| 890 | − _engine->compileTest(); | |
| 888 | + if (QThread::currentThread() != _assetScriptingInterface->thread()) { | |
| 889 | + _assetScriptingInterface->moveToThread(QThread::currentThread()); | |
| 890 | + } | |
| 891 | 891 | |
| 892 | 892 | auto filenameParts = _fileNameString.split("/"); |
| 893 | 893 | auto name = filenameParts.size() > 0 ? filenameParts[filenameParts.size() - 1] : "unknown"; |