Bug 723808 followup: fix shared builds by avoiding use of nsContentUtils::IsSystemPrincipal, r=bz, a=bustage
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -8125,20 +8125,27 @@ nsDocShell::GetInheritedPrincipal(PRBool
}
//-- Get the document's principal
if (document) {
nsIPrincipal *docPrincipal = document->NodePrincipal();
// Don't allow loads in typeContent docShells to inherit the system
// principal from existing documents.
- if (inheritedFromCurrent &&
- mItemType == typeContent &&
- nsContentUtils::IsSystemPrincipal(docPrincipal)) {
- return nsnull;
+ if (inheritedFromCurrent && mItemType == typeContent) {
+ PRBool isSystem;
+ nsresult rv;
+ nsCOMPtr<nsIScriptSecurityManager> secMan =
+ do_GetService(NS_SCRIPTSECURITYMANAGER_CONTRACTID, &rv);
+ NS_ENSURE_SUCCESS(rv, nsnull);
+ rv = secMan->IsSystemPrincipal(docPrincipal, &isSystem);
+ NS_ENSURE_SUCCESS(rv, nsnull);
+
+ if (isSystem)
+ return nsnull;
}
return docPrincipal;
}
return nsnull;
}