Bug 996069 - Part2: minor cleanup in docshell. r=bz

This commit is contained in:
Gabor Krizsanits 2014-04-16 22:29:34 +02:00
parent fe40f38191
commit 24eafeb246

View File

@ -1325,7 +1325,6 @@ nsDocShell::LoadURI(nsIURI * aURI,
if (IsPrintingOrPP()) {
return NS_OK; // JS may not handle returning of an error code
}
nsresult rv;
nsCOMPtr<nsIURI> referrer;
nsCOMPtr<nsIInputStream> postStream;
nsCOMPtr<nsIInputStream> headersStream;
@ -1556,14 +1555,8 @@ nsDocShell::LoadURI(nsIURI * aURI,
}
if (!owner && !inheritOwner && !ownerIsExplicit) {
// See if there's system or chrome JS code running
nsCOMPtr<nsIScriptSecurityManager> secMan =
do_GetService(NS_SCRIPTSECURITYMANAGER_CONTRACTID, &rv);
NS_ENSURE_SUCCESS(rv, rv);
rv = secMan->SubjectPrincipalIsSystem(&inheritOwner);
if (NS_FAILED(rv)) {
// Set it back to false
inheritOwner = false;
}
inheritOwner = nsContentUtils::IsSystemPrincipal(
nsContentUtils::GetSubjectPrincipal());
}
if (aLoadFlags & LOAD_FLAGS_DISALLOW_INHERIT_OWNER) {