Bug 1666751: Use simple and never failing LoadInfo() getter because all channels should have a loadinfo r=freddyb,necko-reviewers

Differential Revision: https://phabricator.services.mozilla.com/D91119
This commit is contained in:
Christoph Kerschbaumer
2020-09-23 12:49:40 +00:00
parent fb01408d2e
commit df7d9d5329
8 changed files with 8 additions and 28 deletions

View File

@@ -1117,11 +1117,7 @@ class ScriptLoaderRunnable final : public nsIRunnable, public nsINamed {
respectedCOEP = mWorkerPrivate->GetOwnerEmbedderPolicy();
}
nsCOMPtr<nsILoadInfo> channelLoadInfo;
rv = channel->GetLoadInfo(getter_AddRefs(channelLoadInfo));
if (NS_WARN_IF(NS_FAILED(rv))) {
return rv;
}
nsCOMPtr<nsILoadInfo> channelLoadInfo = channel->LoadInfo();
channelLoadInfo->SetLoadingEmbedderPolicy(respectedCOEP);
}