backport Bug 1729517 - Set up document correctly. r=freddyb,ckerschb a=RyanVM

This commit is contained in:
roytam1 2021-11-09 21:16:58 +08:00
commit 537bcf5eaf

View file

@ -74,6 +74,7 @@ URIUtils::ResetWithSource(nsIDocument *aNewDoc, nsINode *aSourceNode)
aNewDoc->Reset(channel, loadGroup);
aNewDoc->SetPrincipal(sourcePrincipal);
aNewDoc->SetBaseURI(sourceDoc->GetDocBaseURI());
aNewDoc->SetSandboxFlags(sourceDoc->GetSandboxFlags());
// Copy charset
aNewDoc->SetDocumentCharacterSetSource(