| 354 | tsn_module_info moduleInfo; |
| 355 | if (!tsn_get_module_info(sourceFilename.data(), &moduleInfo)) { |
| 356 | return std::nullopt; |
| 357 | } |
| 358 | |
| 359 | Valdi::IJavaScriptNativeModuleInfo outputInfo; |
| 360 | outputInfo.sha256 = Valdi::StringCache::getGlobal().makeString(std::string_view(moduleInfo.sha256)); |
| 361 | outputInfo.name = Valdi::StringCache::getGlobal().makeString(std::string_view(moduleInfo.name)); |
| 362 | |
| 363 | return outputInfo; |
| 364 | } |
| 365 | |
| 366 | Valdi::JSPropertyNameRef QuickJSJavaScriptContext::newPropertyName(const std::string_view& str) { |
| 367 | auto guard = _threadAccessChecker.guard(); |
| 368 | JSAtom atom = JS_NewAtomLen(_context, str.data(), str.size()); |
| 369 | return Valdi::JSPropertyNameRef(this, toValdiJSPropertyName(atom), true); |
| 370 | } |
| 371 |
nothing calls this directly
no test coverage detected