Bug 1206961 - Use channel->AsyncOpen2() for imageLoader; Remove security checks from callsites (r=bz)

This commit is contained in:
Christoph Kerschbaumer
2016-04-27 19:41:13 +02:00
parent d3cb477cd4
commit 2fdf936e15
5 changed files with 72 additions and 45 deletions

View File

@@ -2188,21 +2188,17 @@ nsTreeBodyFrame::GetImage(int32_t aRowIndex, nsTreeColumn* aCol, bool aUseContex
// XXXbz what's the origin principal for this stuff that comes from our
// view? I guess we should assume that it's the node's principal...
if (nsContentUtils::CanLoadImage(srcURI, mContent, doc,
mContent->NodePrincipal())) {
nsresult rv = nsContentUtils::LoadImage(srcURI,
mContent,
doc,
mContent->NodePrincipal(),
doc->GetDocumentURI(),
doc->GetReferrerPolicy(),
imgNotificationObserver,
nsIRequest::LOAD_NORMAL,
EmptyString(),
getter_AddRefs(imageRequest));
NS_ENSURE_SUCCESS(rv, rv);
}
nsresult rv = nsContentUtils::LoadImage(srcURI,
mContent,
doc,
mContent->NodePrincipal(),
doc->GetDocumentURI(),
doc->GetReferrerPolicy(),
imgNotificationObserver,
nsIRequest::LOAD_NORMAL,
EmptyString(),
getter_AddRefs(imageRequest));
NS_ENSURE_SUCCESS(rv, rv);
}
listener->UnsuppressInvalidation();