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
2023-01-18 13:46:29 +00:00
parent 6be8a3cacb
commit abfe829cb9
5 changed files with 39 additions and 2 deletions

View File

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