Showing the changes to libraries/script-engine/src/ScriptManager.cpp (1 of 2 files). Show all
Unified · Split
| @@ -297,10 +297,10 @@ ScriptManager::ScriptManager(Context context, const QString& scriptContents, con · 296 unmodified lines | ||
| 297 | 297 | } |
| 298 | 298 | }); |
| 299 | 299 | } |
| 300 | − | |
| 300 | + | |
| 301 | 301 | if (!_areMetaTypesInitialized) { |
| 302 | 302 | initMetaTypes(); |
| 303 | − } | |
| 303 | + } | |
| 304 | 304 | } |
| 305 | 305 | |
| 306 | 306 | QString ScriptManager::getTypeAsString() const { |
| @@ -826,9 +826,9 @@ void ScriptManager::run() { · 519 unmodified lines | ||
| 826 | 826 | // (because we're a client script) |
| 827 | 827 | hifi::scripting::setLocalAccessSafeThread(true); |
| 828 | 828 | } |
| 829 | − | |
| 829 | + | |
| 830 | 830 | _engine->enterIsolateOnThisThread(); |
| 831 | − | |
| 831 | + | |
| 832 | 832 | auto filenameParts = _fileNameString.split("/"); |
| 833 | 833 | auto name = filenameParts.size() > 0 ? filenameParts[filenameParts.size() - 1] : "unknown"; |
| 834 | 834 | PROFILE_SET_THREAD_NAME("Script: " + name); |
| @@ -848,7 +848,7 @@ void ScriptManager::run() { · 13 unmodified lines | ||
| 848 | 848 | |
| 849 | 849 | { |
| 850 | 850 | PROFILE_RANGE(script, _fileNameString); |
| 851 | − _engine->evaluate(_scriptContents, _fileNameString); | |
| 851 | + _returnValue = _engine->evaluate(_scriptContents, _fileNameString); | |
| 852 | 852 | _engine->maybeEmitUncaughtException(__FUNCTION__); |
| 853 | 853 | } |
| 854 | 854 | #ifdef _WIN32 |