Skip to content

Commit

Permalink
Bug 479499 - Gracefully handle receiving more data while inside the e…
Browse files Browse the repository at this point in the history
…xpat driver. r+sr=peterv
  • Loading branch information
mrbkap committed Feb 26, 2009
1 parent fe70e28 commit 1df3e3e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions parser/htmlparser/src/nsExpatDriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1202,6 +1202,11 @@ nsExpatDriver::ConsumeToken(nsScanner& aScanner, PRBool& aFlushTokens)
"Unreachable data left in Expat's buffer");

start.advance(length);

// It's possible for start to have passed end if we received more data
// (e.g. if we spun the event loop in an inline script). Reload end now
// to compensate.
aScanner.EndReading(end);
}

aScanner.SetPosition(currentExpatPosition, PR_TRUE);
Expand Down

0 comments on commit 1df3e3e

Please sign in to comment.