mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-13 03:24:26 +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;
|
: pipe->mReadLimit;
|
||||||
len -= pipe->mBuffer.GetSegmentSize() - (end - pipe->mReadCursor);
|
len -= pipe->mBuffer.GetSegmentSize() - (end - pipe->mReadCursor);
|
||||||
}
|
}
|
||||||
if (pipe->mWriteCursor)
|
// if (pipe->mWriteCursor)
|
||||||
len -= pipe->mWriteLimit - pipe->mWriteCursor;
|
//len -= pipe->mWriteLimit - pipe->mWriteCursor;
|
||||||
return len;
|
|
||||||
|
if (result)
|
||||||
|
*result = len;
|
||||||
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
|
Loading…
x
Reference in New Issue
Block a user