зеркало из https://github.com/mozilla/pjs.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:
Родитель
d2178447d3
Коммит
afa07d4972
|
@ -169,6 +169,8 @@ nsCacheEntryChannel::AsyncRead(PRUint32 aStartPosition, PRInt32 aReadCount,
|
||||||
{
|
{
|
||||||
nsresult rv;
|
nsresult rv;
|
||||||
|
|
||||||
|
NS_ENSURE_ARG(aListener);
|
||||||
|
|
||||||
mCacheEntry->NoteAccess();
|
mCacheEntry->NoteAccess();
|
||||||
|
|
||||||
nsCOMPtr<nsIStreamListener> headListener;
|
nsCOMPtr<nsIStreamListener> headListener;
|
||||||
|
@ -183,6 +185,9 @@ nsCacheEntryChannel::AsyncRead(PRUint32 aStartPosition, PRInt32 aReadCount,
|
||||||
getter_AddRefs(headListener));
|
getter_AddRefs(headListener));
|
||||||
if (NS_FAILED(rv)) return rv;
|
if (NS_FAILED(rv)) return rv;
|
||||||
}
|
}
|
||||||
|
NS_ASSERTION(headListener, "Load group listener factory did not create listener");
|
||||||
|
if (!headListener)
|
||||||
|
headListener = aListener;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
headListener = aListener;
|
headListener = aListener;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче