mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 23:31:56 +00:00
optimization (don't call writer with 0 bytes); bug 122221; r=akkana, sr=darin
This commit is contained in:
parent
3c2d249bd8
commit
15e11e7082
@ -458,9 +458,10 @@ nsStorageInputStream::ReadSegments(nsWriteSegmentFun writer, void * closure, PRU
|
||||
PRUint32 available = mStorageStream->mLogicalLength - mLogicalCursor;
|
||||
if (!available)
|
||||
goto out;
|
||||
|
||||
|
||||
mReadCursor = mStorageStream->mSegmentedBuffer->GetSegment(mSegmentNum++);
|
||||
mSegmentEnd = mReadCursor + PR_MIN(mSegmentSize, available);
|
||||
availableInSegment = mSegmentEnd - mReadCursor;
|
||||
}
|
||||
|
||||
count = PR_MIN(availableInSegment, remainingCapacity);
|
||||
|
Loading…
Reference in New Issue
Block a user