MOZ_TIMER_DEBUGLOG(("Start: nsHTMLContentSink::CloseContainer()\n")); MOZ_TIMER_START(mWatch); nsresult rv = NS_OK;  if (eHTMLTag_frameset == aNode.GetNodeType()) { MOZ_TIMER_DEBUGLOG(("Stop: nsHTMLContentSink::CloseContainer()\n")); MOZ_TIMER_STOP(mWatch); return CloseFrameset(aNode);
nsresult result = NS_OK;    FlushTextAndRelease();  SINK_TRACE_NODE(SINK_TRACE_CALLS, "SinkContext::CloseContainer", aNode, mStackPos-1, mSink);  --mStackPos; nsHTMLTag nodeType = mStack[mStackPos].mType; nsIHTMLContent* content = mStack[mStackPos].mContent; content->Compact();   if (0 == (mStack[mStackPos].mFlags & APPENDED)) { if (mStackPos <= 0) { return NS_ERROR_FAILURE; } nsIHTMLContent* parent = mStack[mStackPos-1].mContent;   if (mStack[mStackPos-1].mInsertionPoint != -1) { result = parent->InsertChildAt(content, mStack[mStackPos-1].mInsertionPoint++, mSink->IsInScript()); } else { result = parent->AppendChildTo(content, mSink->IsInScript()); }
HTMLContentSink::CloseContainer(const nsIParserNode& aNode){  MOZ_TIMER_DEBUGLOG(("Start: nsHTMLContentSink::CloseContainer()\n"));  MOZ_TIMER_START(mWatch);  nsresult rv = NS_OK;  // XXX work around parser bug  if (eHTMLTag_frameset == aNode.GetNodeType()) {    MOZ_TIMER_DEBUGLOG(("Stop: nsHTMLContentSink::CloseContainer()\n"));    MOZ_TIMER_STOP(mWatch);    return CloseFrameset(aNode);  }  rv = mCurrentContext->CloseContainer(aNode);  MOZ_TIMER_DEBUGLOG(("Stop: nsHTMLContentSink::CloseContainer()\n"));  MOZ_TIMER_STOP(mWatch);  return rv;}