Bug 1967417 - Create a fallible LoadInfo factory. r=smaug,necko-reviewers,places-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D250182
This commit is contained in:
committed by
tschuster@mozilla.com
parent
fd7d2daf6d
commit
b9a9491a35
@@ -477,11 +477,11 @@ nsresult ScriptLoader::CheckContentPolicy(nsIScriptElement* aElement,
|
||||
if (aElement) {
|
||||
requestingNode = do_QueryInterface(aElement);
|
||||
}
|
||||
nsCOMPtr<nsILoadInfo> secCheckLoadInfo = new net::LoadInfo(
|
||||
nsCOMPtr<nsILoadInfo> secCheckLoadInfo = MOZ_TRY(net::LoadInfo::Create(
|
||||
mDocument->NodePrincipal(), // loading principal
|
||||
mDocument->NodePrincipal(), // triggering principal
|
||||
requestingNode, nsILoadInfo::SEC_ONLY_FOR_EXPLICIT_CONTENTSEC_CHECK,
|
||||
contentPolicyType);
|
||||
contentPolicyType));
|
||||
secCheckLoadInfo->SetParserCreatedScript(aElement &&
|
||||
aElement->GetParserCreated() !=
|
||||
mozilla::dom::NOT_FROM_PARSER);
|
||||
|
||||
Reference in New Issue
Block a user