mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-09 00:11:44 +00:00
Bug #12638 --> Fix nsPipe2::GetLength to return the number of unread bytes in the pipe. r=warren, a=cyeh
This commit is contained in:
parent
859ad58ecd
commit
07a5b957af
@ -329,9 +329,12 @@ nsPipe::nsPipeInputStream::GetLength(PRUint32 *result)
|
||||
: pipe->mReadLimit;
|
||||
len -= pipe->mBuffer.GetSegmentSize() - (end - pipe->mReadCursor);
|
||||
}
|
||||
if (pipe->mWriteCursor)
|
||||
len -= pipe->mWriteLimit - pipe->mWriteCursor;
|
||||
return len;
|
||||
// if (pipe->mWriteCursor)
|
||||
//len -= pipe->mWriteLimit - pipe->mWriteCursor;
|
||||
|
||||
if (result)
|
||||
*result = len;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
Loading…
x
Reference in New Issue
Block a user