nsresult HTMLContentSink::AddComment(const nsIParserNode& aNode) { NS_START_STOPWATCH(mWatch) nsresult rv = NS_OK; rv = mCurrentContext->AddComment(aNode); NS_STOP_STOPWATCH(mWatch) return rv;
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();  #ifdef DEBUG if (mPreAppend && mSink->mDirty && SINK_LOG_TEST(gSinkLogModuleInfo,SINK_ALWAYS_REFLOW)) { mSink->ForceReflow(); } #endif } NS_RELEASE(comment); }  return result;
nsresult HTMLContentSink::AddComment(const nsIParserNode& aNode) {  NS_START_STOPWATCH(mWatch)  nsresult rv = NS_OK;  rv = mCurrentContext->AddComment(aNode);  NS_STOP_STOPWATCH(mWatch)  return rv;}