mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
Making sure that mCountRemaining also gets updated when data gets inserted into the scanner buffer. b=117441, r=heikki, sr=jst
This commit is contained in:
parent
d606de2ade
commit
87cecdb92d
@ -294,8 +294,10 @@ PRBool nsScanner::UngetReadable(const nsAString& aBuffer) {
|
||||
mSlidingBuffer->UngetReadable(aBuffer,mCurrentPosition);
|
||||
mSlidingBuffer->BeginReading(mCurrentPosition); // Insertion invalidated our iterators
|
||||
mSlidingBuffer->EndReading(mEndPosition);
|
||||
mTotalRead += aBuffer.Length();
|
||||
|
||||
|
||||
PRUint32 length = aBuffer.Length();
|
||||
mCountRemaining += length; // Ref. bug 117441
|
||||
mTotalRead += length;
|
||||
return PR_TRUE;
|
||||
}
|
||||
|
||||
|
@ -294,8 +294,10 @@ PRBool nsScanner::UngetReadable(const nsAString& aBuffer) {
|
||||
mSlidingBuffer->UngetReadable(aBuffer,mCurrentPosition);
|
||||
mSlidingBuffer->BeginReading(mCurrentPosition); // Insertion invalidated our iterators
|
||||
mSlidingBuffer->EndReading(mEndPosition);
|
||||
mTotalRead += aBuffer.Length();
|
||||
|
||||
|
||||
PRUint32 length = aBuffer.Length();
|
||||
mCountRemaining += length; // Ref. bug 117441
|
||||
mTotalRead += length;
|
||||
return PR_TRUE;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user