mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 01:48:05 +00:00
Bug 897904 - Set nsInputStreamPump::mStatus only if EnsureWaiting fails
This commit is contained in:
parent
9905ab6f3e
commit
55ccfb3702
@ -425,11 +425,15 @@ nsInputStreamPump::OnInputStreamReady(nsIAsyncInputStream *stream)
|
||||
if (!mSuspendCount && (stillTransferring || mRetargeting)) {
|
||||
mState = nextState;
|
||||
mWaiting = false;
|
||||
mStatus = EnsureWaiting();
|
||||
if (NS_SUCCEEDED(mStatus))
|
||||
nsresult rv = EnsureWaiting();
|
||||
if (NS_SUCCEEDED(rv))
|
||||
break;
|
||||
|
||||
// Failure to start asynchronous wait: stop transfer.
|
||||
// Do not set mStatus if it was previously set to report a failure.
|
||||
if (NS_SUCCEEDED(mStatus)) {
|
||||
mStatus = rv;
|
||||
}
|
||||
nextState = STATE_STOP;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user