Push up GetPrincipal to nsINode (as GetNodePrincipal). This way all nsINodes

(content, documents, attr nodes) can return their principal as needed.
Eliminate lazy allocation of principals in nsDocument.  Bug 324600, r=sicking, sr=jst
This commit is contained in:
bzbarsky@mit.edu
2006-02-02 20:02:34 +00:00
parent 702017d8ec
commit 995f519031
46 changed files with 280 additions and 441 deletions

View File

@@ -810,7 +810,9 @@ nsObjectLoadingContent::LoadObject(nsIURI* aURI,
if (aURI) {
nsIScriptSecurityManager* secMan = nsContentUtils::GetSecurityManager();
NS_ASSERTION(secMan, "No security manager!?");
nsresult rv = secMan->CheckLoadURIWithPrincipal(doc->GetPrincipal(), aURI, 0);
nsresult rv =
secMan->CheckLoadURIWithPrincipal(thisContent->GetNodePrincipal(),
aURI, 0);
if (NS_FAILED(rv)) {
Fallback(PR_FALSE);
return NS_OK;