Bug 1583076 - Initialize cspToInherit with the loading context when deserializing. r=ckerschb

Differential Revision: https://phabricator.services.mozilla.com/D46739

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Matt Woodrow 2019-09-25 04:50:25 +00:00
parent 9ea55f75c4
commit 18eac852f7

View File

@ -738,7 +738,8 @@ nsresult LoadInfoArgsToLoadInfo(
Maybe<mozilla::ipc::CSPInfo> cspToInheritInfo =
loadInfoArgs.cspToInheritInfo();
if (cspToInheritInfo.isSome()) {
cspToInherit = CSPInfoToCSP(cspToInheritInfo.ref(), nullptr);
nsCOMPtr<Document> doc = do_QueryInterface(aLoadingContext);
cspToInherit = CSPInfoToCSP(cspToInheritInfo.ref(), doc);
}
RefPtr<mozilla::LoadInfo> loadInfo = new mozilla::LoadInfo(