| 354 | auto guard = _threadAccessChecker.guard(); |
| 355 | return checkCallAndGetValue(exceptionTracker, tsn_load_module(_context, sourceFilename.data())); |
| 356 | } |
| 357 | |
| 358 | std::optional<Valdi::IJavaScriptNativeModuleInfo> QuickJSJavaScriptContext::getNativeModuleInfo( |
| 359 | const std::string_view& sourceFilename) { |
| 360 | tsn_module_info moduleInfo; |
| 361 | if (!tsn_get_module_info(sourceFilename.data(), &moduleInfo)) { |
| 362 | return std::nullopt; |
| 363 | } |
| 364 | |
| 365 | Valdi::IJavaScriptNativeModuleInfo outputInfo; |
| 366 | outputInfo.sha256 = Valdi::StringCache::getGlobal().makeString(std::string_view(moduleInfo.sha256)); |
| 367 | outputInfo.name = Valdi::StringCache::getGlobal().makeString(std::string_view(moduleInfo.name)); |
| 368 | |
| 369 | return outputInfo; |
| 370 | } |
| 371 |
nothing calls this directly
no test coverage detected