Bug 1540913 - Part 5: Track ScriptLoaders on WorkerLoadContext; r=jonco

As mentioned in the previous patch, this patch introduces tracking and shutdown of scriptloaders in
the case that we have multiple scriptloaders involved in module loading.

Differential Revision: https://phabricator.services.mozilla.com/D171686
This commit is contained in:
Yulia
2023-03-14 18:16:32 +00:00
parent cd357db31b
commit f2ff7f8dfc
5 changed files with 26 additions and 13 deletions

View File

@@ -601,7 +601,7 @@ already_AddRefed<ScriptLoadRequest> WorkerScriptLoader::CreateScriptLoadRequest(
Maybe<ClientInfo> clientInfo = GetGlobal()->GetClientInfo();
RefPtr<WorkerLoadContext> loadContext =
new WorkerLoadContext(kind, clientInfo);
new WorkerLoadContext(kind, clientInfo, this);
// Create ScriptLoadRequests for this WorkerScriptLoader
ReferrerPolicy referrerPolicy = mWorkerRef->Private()->GetReferrerPolicy();