MCPcopy Create free account
hub / github.com/Snapchat/Valdi / doEvalScript

Method doEvalScript

valdi/src/valdi/standalone_runtime/ValdiStandaloneRuntime.cpp:247–257  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

245}
246
247void ValdiStandaloneRuntime::doEvalScript(const StringBox& scriptPath, const std::vector<StringBox>& jsArguments) {
248 setupJsRuntime(jsArguments);
249
250 auto result = _runtime->getJavaScriptRuntime()->evalModuleSync(scriptPath, _shouldWaitForHotReload);
251 if (!result) {
252 VALDI_ERROR(ConsoleLogger::getLogger(), "{}", result.error());
253 if (!_shouldWaitForHotReload) {
254 _mainQueue->exit(1);
255 }
256 }
257}
258
259void ValdiStandaloneRuntime::waitForHotReloadAndEvalScript(const StringBox& scriptPath,
260 const std::vector<StringBox>& jsArguments) {

Callers

nothing calls this directly

Calls 4

evalModuleSyncMethod · 0.80
getJavaScriptRuntimeMethod · 0.80
errorMethod · 0.65
exitMethod · 0.65

Tested by

no test coverage detected