From afa07d49723245c8e48e1d63c62bea4b78810455 Mon Sep 17 00:00:00 2001 From: "fur%geocast.com" Date: Sat, 18 Dec 1999 14:59:59 +0000 Subject: [PATCH] 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. --- netwerk/cache/mgr/nsCacheEntryChannel.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/netwerk/cache/mgr/nsCacheEntryChannel.cpp b/netwerk/cache/mgr/nsCacheEntryChannel.cpp index 4a6518d3ae8..9e64e0017a9 100644 --- a/netwerk/cache/mgr/nsCacheEntryChannel.cpp +++ b/netwerk/cache/mgr/nsCacheEntryChannel.cpp @@ -169,6 +169,8 @@ nsCacheEntryChannel::AsyncRead(PRUint32 aStartPosition, PRInt32 aReadCount, { nsresult rv; + NS_ENSURE_ARG(aListener); + mCacheEntry->NoteAccess(); nsCOMPtr 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;