mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 699780 - Redundant call to Seek() in nsStorageStream::GetOutputStream(); r=bsmedberg
This commit is contained in:
parent
2f9171b753
commit
49170ce086
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user