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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user