if (popContent) { if (NS_FAILED(PopResourceAndState(resource, mState))) { char* tagStr = aNode.GetText().ToNewCString(); printf("extra close tag '</%s>' at line %d\n", tagStr, aNode.GetSourceLineNumber()); delete[] tagStr;   return NS_OK; } }
if (popContent) { if (NS_FAILED(PopResourceAndState(resource, mState))) { #ifdef PR_LOGGING if (PR_LOG_TEST(gLog, PR_LOG_ALWAYS)) { char* tagStr = aNode.GetText().ToNewCString(); PR_LOG(gLog, PR_LOG_ALWAYS, ("xul: extra close tag '</%s>' at line %d\n", tagStr, aNode.GetSourceLineNumber())); delete[] tagStr; } #endif  return NS_OK; } }
XULContentSinkImpl::CloseContainer(const nsIParserNode& aNode){    nsresult rv;#ifdef DEBUG    const nsString& text = aNode.GetText();#endif    if (mState == eXULContentSinkState_InScript) {        if (NS_FAILED(rv = CloseScript(aNode)))            return rv;    }    else {        FlushText();    }	// XXX The following code is a hack to make forms work in XUL. Forms aren't	// really pushed and popped like other elements.	  nsAutoString tag;    PRInt32 nameSpaceID;    SplitQualifiedName(aNode.GetText(), nameSpaceID, tag);	  PRBool popContent = PR_TRUE;    if (nameSpaceID == kNameSpaceID_HTML) {		    if (tag.Equals("form"))		        popContent = PR_FALSE;		}    nsIRDFResource* resource;	  if (popContent) {		    if (NS_FAILED(PopResourceAndState(resource, mState))) {						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();    if (nestLevel == 0)        mState = eXULContentSinkState_InEpilog;    PopNameSpaces();          NS_IF_RELEASE(resource);    return NS_OK;}