зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1264768
- Dispatch error event when image loads for URLs that fail to resolve, r=hsivonen
--HG-- extra : rebase_source : 109914a4204a4dcf2f21e861da269e5bb476acf0
This commit is contained in:
Родитель
472523ec05
Коммит
33cf3aca7f
|
@ -748,10 +748,15 @@ nsImageLoadingContent::LoadImage(const nsAString& aNewURI,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
// Second, parse the URI string to get image URI
|
||||
nsCOMPtr<nsIURI> imageURI;
|
||||
nsresult rv = StringToURI(aNewURI, doc, getter_AddRefs(imageURI));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
// XXXbiesi fire onerror if that failed?
|
||||
if (NS_FAILED(rv)) {
|
||||
// Cancel image requests and fire error event per spec
|
||||
CancelImageRequests(aNotify);
|
||||
FireEvent(NS_LITERAL_STRING("error"));
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
bool equal;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче