Bug 1247687 - Implement InitModuleLoader methods for WorkerScriptLoader and WorkerGlobalScope; r=jonco

This implements a method to initialize the moduleLoader for workers. This will initialize only once, for all worker types (module and classic).

Depends on D147324

Differential Revision: https://phabricator.services.mozilla.com/D147326
This commit is contained in:
Yulia Startsev
2022-12-20 20:56:12 +00:00
parent e4cf9613b8
commit 1f63ccd529
5 changed files with 47 additions and 4 deletions

View File

@@ -983,7 +983,9 @@ void ModuleLoaderBase::Shutdown() {
MOZ_ASSERT(mFetchingModules.IsEmpty());
for (const auto& entry : mFetchedModules) {
entry.GetData()->Shutdown();
if (entry.GetData()) {
entry.GetData()->Shutdown();
}
}
mFetchedModules.Clear();