Bug 4433. Fix XUL content sink to return NS_OK instead of NS_ERROR_UNEXPECTED when it sees too many close tags.

git-svn-id: svn://10.0.0.236/trunk@25642 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
waterson%netscape.com 1999-03-31 03:53:46 +00:00
parent 5c3c0a4d1f
commit a2c295121f

View File

@ -512,8 +512,12 @@ XULContentSinkImpl::CloseContainer(const nsIParserNode& aNode)
nsIRDFResource* resource;
if (NS_FAILED(PopResourceAndState(resource, mState))) {
NS_ERROR("parser didn't catch unmatched tags?");
return NS_ERROR_UNEXPECTED; // XXX
char* tagStr = aNode.GetText().ToNewCString();
printf("extra close tag '</%s>' at line %d\n", tagStr, aNode.GetSourceLineNumber());
delete[] tagStr;
// Failure to return NS_OK causes stuff to freak out. See Bug 4433.
return NS_OK;
}
PRInt32 nestLevel = mContextStack->Count();