зеркало из https://github.com/mozilla/gecko-dev.git
Added assertion and trivial recovery code to catch the case of a load group
listener factory that reports success, but nevertheless returns a NULL stream listener.
This commit is contained in:
Родитель
94eddbd362
Коммит
a516109cda
|
@ -169,6 +169,8 @@ nsCacheEntryChannel::AsyncRead(PRUint32 aStartPosition, PRInt32 aReadCount,
|
|||
{
|
||||
nsresult rv;
|
||||
|
||||
NS_ENSURE_ARG(aListener);
|
||||
|
||||
mCacheEntry->NoteAccess();
|
||||
|
||||
nsCOMPtr<nsIStreamListener> headListener;
|
||||
|
@ -183,6 +185,9 @@ nsCacheEntryChannel::AsyncRead(PRUint32 aStartPosition, PRInt32 aReadCount,
|
|||
getter_AddRefs(headListener));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
}
|
||||
NS_ASSERTION(headListener, "Load group listener factory did not create listener");
|
||||
if (!headListener)
|
||||
headListener = aListener;
|
||||
|
||||
} else {
|
||||
headListener = aListener;
|
||||
|
|
Загрузка…
Ссылка в новой задаче