CR-2 21114 -- BaseScriptEngine.cpp, order-of-operations fixes, reworked JS Exceptions
Showing the changes to assignment-client/src/scripts/EntityScriptServer.cpp (1 of 27 files). Show all
Unified · Split
| @@ -394,7 +394,7 @@ void EntityScriptServer::selectAudioFormat(const QString& selectedCodecName) { · 393 unmodified lines | |||
| 394 | } | 394 | } |
| 395 | 395 | ||
| 396 | void EntityScriptServer::resetEntitiesScriptEngine() { | 396 | void EntityScriptServer::resetEntitiesScriptEngine() { |
| 397 | auto engineName = QString("Entities %1").arg(++_entitiesScriptEngineCount); | 397 | auto engineName = QString("about:Entities %1").arg(++_entitiesScriptEngineCount); |
| 398 | auto newEngine = QSharedPointer<ScriptEngine>(new ScriptEngine(ScriptEngine::ENTITY_SERVER_SCRIPT, NO_SCRIPT, engineName)); | 398 | auto newEngine = QSharedPointer<ScriptEngine>(new ScriptEngine(ScriptEngine::ENTITY_SERVER_SCRIPT, NO_SCRIPT, engineName)); |
| 399 | 399 | ||
| 400 | auto webSocketServerConstructorValue = newEngine->newFunction(WebSocketServerClass::constructor); | 400 | auto webSocketServerConstructorValue = newEngine->newFunction(WebSocketServerClass::constructor); |
| @@ -477,7 +477,7 @@ void EntityScriptServer::checkAndCallPreload(const EntityItemID& entityID, const · 76 unmodified lines | |||
| 477 | if (!scriptUrl.isEmpty()) { | 477 | if (!scriptUrl.isEmpty()) { |
| 478 | scriptUrl = ResourceManager::normalizeURL(scriptUrl); | 478 | scriptUrl = ResourceManager::normalizeURL(scriptUrl); |
| 479 | qCDebug(entity_script_server) << "Loading entity server script" << scriptUrl << "for" << entityID; | 479 | qCDebug(entity_script_server) << "Loading entity server script" << scriptUrl << "for" << entityID; |
| 480 | ScriptEngine::loadEntityScript(_entitiesScriptEngine, entityID, scriptUrl, reload); | 480 | _entitiesScriptEngine->loadEntityScript(entityID, scriptUrl, reload); |
| 481 | } | 481 | } |
| 482 | } | 482 | } |
| 483 | } | 483 | } |