Skip to content

Commit

Permalink
bug 273324: Hang on unclosed comments in standards mode. r=jst sr=bzb…
Browse files Browse the repository at this point in the history
…arsky
  • Loading branch information
mrbkap%gmail.com committed Dec 7, 2004
1 parent 71228f9 commit 95a501f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion parser/htmlparser/src/nsHTMLTokenizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Blake Kaplan <[email protected]>
*
* Alternatively, the contents of this file may be used under the terms of
* either of the GNU General Public License Version 2 or later (the "GPL"),
Expand Down Expand Up @@ -976,7 +977,7 @@ nsresult nsHTMLTokenizer::ConsumeComment(PRUnichar aChar,CToken*& aToken,nsScann

if (kNotAComment == result) {
// AddToken has IF_FREE()'d our token, so...
return ConsumeText(aToken, aScanner);
result = ConsumeText(aToken, aScanner);
}

return result;
Expand Down Expand Up @@ -1054,6 +1055,11 @@ nsresult nsHTMLTokenizer::ConsumeSpecialMarkup(PRUnichar aChar,CToken*& aToken,n
result=aToken->Consume(aChar,aScanner,mFlags);
AddToken(aToken,result,&mTokenDeque,theAllocator);
}

if (result == kNotAComment) {
result = ConsumeText(aToken, aScanner);
}

return result;
}

Expand Down

0 comments on commit 95a501f

Please sign in to comment.