History

Optimized getEntityProperties

ksuprynowicz committed 3 years ago

Commit fdd8cb21 parent c18fd9017 files · +133 −96Browse files

Showing the changes to libraries/script-engine/src/ScriptManager.cpp (1 of 17 files). Show all

Unified · Split

libraries/script-engine/src/ScriptManager.cpp+2−0
@@ -2181,6 +2181,8 @@ void ScriptManager::entityScriptContentAvailable(const EntityItemID& entityID, c · 2180 unmodified lines
2181 QUrl sandboxURL = currentSandboxURL.isEmpty() ? scriptOrURL : currentSandboxURL;2181 QUrl sandboxURL = currentSandboxURL.isEmpty() ? scriptOrURL : currentSandboxURL;
2182 auto initialization = [&]{2182 auto initialization = [&]{
2183 entityScriptConstructor = _engine->evaluate(contents, fileName);2183 entityScriptConstructor = _engine->evaluate(contents, fileName);
2184 //V8TODO: check if entityScriptConstructor is a function or not
2185 //Throw V8 exception if it's not?
2184 entityScriptObject = entityScriptConstructor.construct();2186 entityScriptObject = entityScriptConstructor.construct();
2185 2187
2186 if (_engine->hasUncaughtException()) {2188 if (_engine->hasUncaughtException()) {