SinkContext::AddComment(const nsIParserNode& aNode) { nsIContent *comment; nsIDOMComment *domComment; nsresult result = NS_OK;  FlushText();  result = NS_NewCommentNode(&comment); if (NS_OK == result) { result = comment->QueryInterface(kIDOMCommentIID, (void **)&domComment); if (NS_OK == result) { domComment->AppendData(aNode.GetText()); NS_RELEASE(domComment);  comment->SetDocument(mSink->mDocument, PR_FALSE);  nsIHTMLContent* parent; if ((nsnull == mSink->mBody) && (nsnull != mSink->mHead)) { parent = mSink->mHead; } else { parent = mStack[mStackPos - 1].mContent; } parent->AppendChildTo(comment, PR_FALSE);   MaybeMarkSinkDirty(); } NS_RELEASE(comment); }  return result;
nsresult HTMLContentSink::AddComment(const nsIParserNode& aNode) { return mCurrentContext->AddComment(aNode);
SinkContext::AddComment(const nsIParserNode& aNode){  nsIContent *comment;  nsIDOMComment *domComment;  nsresult result = NS_OK;  FlushText();    result = NS_NewCommentNode(&comment);  if (NS_OK == result) {    result = comment->QueryInterface(kIDOMCommentIID,                                      (void **)&domComment);    if (NS_OK == result) {      domComment->AppendData(aNode.GetText());      NS_RELEASE(domComment);            comment->SetDocument(mSink->mDocument, PR_FALSE);            nsIHTMLContent* parent;      if ((nsnull == mSink->mBody) && (nsnull != mSink->mHead)) {        parent = mSink->mHead;      }      else {        parent = mStack[mStackPos - 1].mContent;      }      parent->AppendChildTo(comment, PR_FALSE);            // Mark sink dirty if it can safely reflow something      MaybeMarkSinkDirty();    }    NS_RELEASE(comment);  }    return result;}