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

Method getNativeModuleInfo

valdi/src/valdi/quickjs/QuickJSJavaScriptContext.cpp:336–348  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

334 return checkCallAndGetValue(exceptionTracker, JS_EvalFunction(_context, retainedResult));
335}
336
337Valdi::JSValueRef QuickJSJavaScriptContext::evaluate(const std::string& script,
338 const std::string_view& sourceFilename,
339 Valdi::JSExceptionTracker& exceptionTracker) {
340 auto guard = _threadAccessChecker.guard();
341 return checkCallAndGetValue(
342 exceptionTracker,
343 JS_Eval(_context, reinterpret_cast<const char*>(script.data()), script.size(), sourceFilename.data(), 0));
344}
345
346Valdi::JSValueRef QuickJSJavaScriptContext::evaluateNative(const std::string_view& sourceFilename,
347 Valdi::JSExceptionTracker& exceptionTracker) {
348 auto guard = _threadAccessChecker.guard();
349 return checkCallAndGetValue(exceptionTracker, tsn_load_module(_context, sourceFilename.data()));
350}
351

Callers

nothing calls this directly

Calls 4

tsn_get_module_infoFunction · 0.85
getGlobalFunction · 0.85
makeStringMethod · 0.80
dataMethod · 0.45

Tested by

no test coverage detected