Use the principal doing the load to decide on the URI to pass to content policies. This will help do the right thing for data:/javascript:/about:blank, as well as allow us to skip content policies altogether if the caller is system. Bug 388597, r+sr=sicking
This commit is contained in:
@@ -220,14 +220,10 @@ CheckPingURI(nsIURI* uri, nsIContent* content)
|
||||
|
||||
// Check with contentpolicy
|
||||
PRInt16 shouldLoad = nsIContentPolicy::ACCEPT;
|
||||
nsIURI* docURI = nsnull;
|
||||
nsIDocument* doc = content->GetOwnerDoc();
|
||||
if (doc) {
|
||||
docURI = doc->GetDocumentURI();
|
||||
}
|
||||
rv = NS_CheckContentLoadPolicy(nsIContentPolicy::TYPE_PING,
|
||||
uri,
|
||||
docURI,
|
||||
nsnull,
|
||||
content->NodePrincipal(),
|
||||
content,
|
||||
EmptyCString(), // mime hint
|
||||
nsnull, //extra
|
||||
|
||||
Reference in New Issue
Block a user