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-14 14:55:35 +00:00
parent 145e60ef15
commit b2b84bd175
5 changed files with 47 additions and 4 deletions

View File

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