mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-27 13:40:37 -10:00
Make parsing super-large script/cdata/whatever blocks faster by using
size_forward as a lower-bound estimate for actual distance to end of string. Bug 171124, r+sr=dbaron
This commit is contained in:
1 parent
a0c489366d
commit
21d76eb604
2 files changed
+4
-2
No files matched your search
@@ -595,7 +595,8 @@ nsresult CTextToken::ConsumeUntil(PRUnichar aChar,PRBool aIgnoreComments,nsScann
|
||||
PRBool found = PR_FALSE;
|
||||
nsReadingIterator<PRUnichar> gtOffset,ltOffset = theCurrOffset;
|
||||
while (FindCharInReadable(PRUnichar(kLessThan), ltOffset, endPos) &&
|
||||
Distance(ltOffset, endPos) >= termStrLen) {
|
||||
((PRUint32)ltOffset.size_forward() >= termStrLen ||
|
||||
Distance(ltOffset, endPos) >= termStrLen)) {
|
||||
// Make a copy of the (presumed) end tag and
|
||||
// do a case-insensitive comparison
|
||||
|
||||
|
||||
Reference in new issue
Block a user