From d3fc632669c98bc8a94c820be75455ca4b446cf7 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Wed, 22 Oct 2008 21:43:15 -0400 Subject: [PATCH] Bug 455311. Better handling of a successful redirect. r+sr=biesi pending --- netwerk/base/src/nsBaseChannel.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/netwerk/base/src/nsBaseChannel.cpp b/netwerk/base/src/nsBaseChannel.cpp index 7d4f2ad3ff71..3355100486ca 100644 --- a/netwerk/base/src/nsBaseChannel.cpp +++ b/netwerk/base/src/nsBaseChannel.cpp @@ -253,16 +253,19 @@ void nsBaseChannel::HandleAsyncRedirect(nsIChannel* newChannel) { NS_ASSERTION(!mPump, "Shouldn't have gotten here"); + PRBool doNotify = PR_TRUE; if (NS_SUCCEEDED(mStatus)) { nsresult rv = Redirect(newChannel, nsIChannelEventSink::REDIRECT_INTERNAL, PR_TRUE); if (NS_FAILED(rv)) Cancel(rv); + else + doNotify = PR_FALSE; } mWaitingOnAsyncRedirect = PR_FALSE; - if (NS_FAILED(mStatus)) { + if (doNotify) { // Notify our consumer ourselves mListener->OnStartRequest(this, mListenerContext); mListener->OnStopRequest(this, mListenerContext, mStatus);