зеркало из https://github.com/mozilla/pjs.git
optimization (don't call writer with 0 bytes); bug 122221; r=akkana, sr=darin
This commit is contained in:
Родитель
846739bee3
Коммит
39ee6aae6d
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче