| 388 | if (!archiveResult) { |
| 389 | if (!_hotReloaderEnabled) { |
| 390 | VALDI_ERROR(_logger, "Failed to load archive of Module '{}': {}", bundleName, archiveResult.error()); |
| 391 | } |
| 392 | initializeBundle(bundleInitializer, makeShared<ValdiModuleArchive>()); |
| 393 | } else { |
| 394 | hasAssetPackage = inlineAssetsEnabled && archiveResult.value()->containsEntry(assetPackageKey); |
| 395 | initializeBundle(bundleInitializer, archiveResult.value()); |
| 396 | } |
| 397 | |
| 398 | populateSourceMap(bundleName, *bundleInitializer.getBundle()); |
| 399 | |
| 400 | if (hasAssetPackage) { |
| 401 | insertAssetPackageInBundle(bundleInitializer.getBundle(), |
| 402 | bundleInitializer.getBundle()->getEntry(assetPackageKey).value()); |
| 403 | } |
| 404 | |
| 405 | if (Valdi::traceLoadModules) { |
| 406 | VALDI_INFO(_logger, "Loaded bundle '{}' in {}", bundleName, sw.elapsed()); |
| 407 | } |
| 408 | |
| 409 | return bundleInitializer.getBundle(); |
| 410 | } |
| 411 | |
| 412 | /** |
| 413 | * Returns the list of all loaded bundle names. |
| 414 | * Returns: |
| 415 | * - A vector of all loaded bundle names. |
| 416 | */ |
| 417 | std::vector<StringBox> ResourceManager::getAllLoadedBundleNames() const { |
| 418 | std::lock_guard<Mutex> guard(_mutex); |
| 419 | std::vector<StringBox> result; |
| 420 | result.reserve(_bundleByName.size()); |
| 421 | for (const auto& it : _bundleByName) { |
| 422 | result.push_back(it.first); |
| 423 | } |
nothing calls this directly
no test coverage detected