Bug 699365 - Avoid asserting when the parser command is "external-resource". r=smaug.

This commit is contained in:
Henri Sivonen 2011-11-30 15:11:38 +02:00
parent 183f3cd3e5
commit 341491e1c3
3 changed files with 7 additions and 2 deletions

View File

@ -130,6 +130,7 @@ nsHtml5Parser::SetCommand(const char* aCommand)
{
NS_ASSERTION(!strcmp(aCommand, "view") ||
!strcmp(aCommand, "view-source") ||
!strcmp(aCommand, "external-resource") ||
!strcmp(aCommand, kLoadAsData),
"Unsupported parser command");
}
@ -719,8 +720,9 @@ nsHtml5Parser::MarkAsNotScriptCreated(const char* aCommand)
}
#ifdef DEBUG
else {
NS_ASSERTION(!nsCRT::strcmp(aCommand, "view"),
"Unsupported parser command!");
NS_ASSERTION(!nsCRT::strcmp(aCommand, "view") ||
!nsCRT::strcmp(aCommand, "external-resource"),
"Unsupported parser command!");
}
#endif
mStreamParser = new nsHtml5StreamParser(mExecutor, this, mode);

View File

@ -0,0 +1,2 @@
<!DOCTYPE html>
<div style="filter: url(data:text/html,#nofilter)"></div>

View File

@ -49,3 +49,4 @@ load 591330-1.html
load 650501-1.xhtml
load 696651-1.html
load view-source:699347-1.xml
load 699365-1.html