mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
Bug 455311. Better handling of a successful redirect. r+sr=biesi pending
This commit is contained in:
parent
d78446486a
commit
d3fc632669
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user