mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-10 22:09:32 +00:00
Bug 1305025 - Don't return error from nsPipe::Status when there are data to read to prevent potentiall loop. r=jduell
--HG-- extra : rebase_source : 8362d5f7e6a459d507ba8b7ac8a74afed9242982
This commit is contained in:
parent
63caea8af6
commit
eeb66ca287
@ -1525,7 +1525,18 @@ nsPipeInputStream::Clone(nsIInputStream** aCloneOut)
|
||||
nsresult
|
||||
nsPipeInputStream::Status(const ReentrantMonitorAutoEnter& ev) const
|
||||
{
|
||||
return NS_FAILED(mInputStatus) ? mInputStatus : mPipe->mStatus;
|
||||
if (NS_FAILED(mInputStatus)) {
|
||||
return mInputStatus;
|
||||
}
|
||||
|
||||
if (mReadState.mAvailable) {
|
||||
// Still something to read and this input stream state is OK.
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// Nothing to read, just fall through to the pipe's state that
|
||||
// may reflect state of its output stream side (already closed).
|
||||
return mPipe->mStatus;
|
||||
}
|
||||
|
||||
nsresult
|
||||
|
Loading…
x
Reference in New Issue
Block a user