зеркало из https://github.com/mozilla/gecko-dev.git
Bug 699780 - Redundant call to Seek() in nsStorageStream::GetOutputStream(); r=bsmedberg
This commit is contained in:
Родитель
909149e93b
Коммит
3f78fc0cc3
|
@ -123,11 +123,11 @@ nsStorageStream::GetOutputStream(PRInt32 aStartingOffset,
|
|||
// all the other segments in the buffer. (It may have been realloc'ed
|
||||
// smaller in the Close() method.)
|
||||
if (mLastSegmentNum >= 0)
|
||||
mSegmentedBuffer->ReallocLastSegment(mSegmentSize);
|
||||
|
||||
// Need to re-Seek, since realloc might have changed segment base pointer
|
||||
rv = Seek(aStartingOffset);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
if (mSegmentedBuffer->ReallocLastSegment(mSegmentSize)) {
|
||||
// Need to re-Seek, since realloc changed segment base pointer
|
||||
rv = Seek(aStartingOffset);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
}
|
||||
|
||||
NS_ADDREF(this);
|
||||
*aOutputStream = static_cast<nsIOutputStream*>(this);
|
||||
|
|
Загрузка…
Ссылка в новой задаче