Bug 965413 part 12. Use a LoadInfo in SetUpChannelOwner. r=smaug
This commit is contained in:
@@ -10008,21 +10008,9 @@ nsDocShell::DoURILoad(nsIURI * aURI,
|
||||
}
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIPrincipal> ownerPrincipal;
|
||||
|
||||
// If the content being loaded should be sandboxed with respect to origin
|
||||
// we need to create a new null principal here, and then tell
|
||||
// nsContentUtils::SetUpChannelOwner to force it to be set as the
|
||||
// channel owner.
|
||||
if (mSandboxFlags & SANDBOXED_ORIGIN) {
|
||||
ownerPrincipal = do_CreateInstance("@mozilla.org/nullprincipal;1");
|
||||
} else {
|
||||
// Not sandboxed - we allow the content to assume its natural owner.
|
||||
ownerPrincipal = do_QueryInterface(aOwner);
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIPrincipal> ownerPrincipal = do_QueryInterface(aOwner);
|
||||
nsContentUtils::SetUpChannelOwner(ownerPrincipal, channel, aURI, true,
|
||||
(mSandboxFlags & SANDBOXED_ORIGIN) ||
|
||||
mSandboxFlags & SANDBOXED_ORIGIN,
|
||||
isSrcdoc);
|
||||
|
||||
nsCOMPtr<nsIScriptChannel> scriptChannel = do_QueryInterface(channel);
|
||||
|
||||
Reference in New Issue
Block a user