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

@@ -162,7 +162,9 @@ nsFrameLoader::LoadURI(nsIURI* aURI)
// to inherit an owner from the current document.
loadInfo->SetInheritOwner(PR_TRUE);
principal = doc->GetPrincipal();
principal = mOwnerContent->GetNodePrincipal();
NS_ASSERTION(principal == doc->GetNodePrincipal(),
"Principal mismatch. Should not happen");
}
if (!principal) {