if (mFlags & NS_SINK_FLAG_CAN_INTERRUPT_PARSER) {     RemoveDummyParserRequest(); }
HTMLContentSink::DidBuildModel(PRInt32 aQualityLevel){  // NRA Dump stopwatch stop info here#ifdef MOZ_PERF_METRICS  MOZ_TIMER_DEBUGLOG(("Stop: nsHTMLContentSink::DidBuildModel(), this=%p\n", this));  MOZ_TIMER_STOP(mWatch);  MOZ_TIMER_LOG(("Content creation time (this=%p): ", this));  MOZ_TIMER_PRINT(mWatch);#endif  // Cancel a timer if we had one out there  if (mNotificationTimer) {    SINK_TRACE(SINK_TRACE_REFLOW,               ("HTMLContentSink::DidBuildModel: canceling notification timeout"));    mNotificationTimer->Cancel();    mNotificationTimer = 0;  }  if (nsnull == mTitle) {    nsCOMPtr<nsIDOMHTMLDocument> domDoc(do_QueryInterface(mHTMLDocument));    if (domDoc)      domDoc->SetTitle(nsString());  }  // XXX this is silly; who cares? RickG cares. It's part of the regression test. So don't bug me.   PRInt32 i, ns = mDocument->GetNumberOfShells();  for (i = 0; i < ns; i++) {    nsCOMPtr<nsIPresShell> shell;    mDocument->GetShellAt(i, getter_AddRefs(shell));    if (shell) {      nsCOMPtr<nsIViewManager> vm;      nsresult rv = shell->GetViewManager(getter_AddRefs(vm));      if(NS_SUCCEEDED(rv) && vm) {        vm->SetQuality(nsContentQuality(aQualityLevel));      }    }  }  // Reflow the last batch of content  if (mBody) {    SINK_TRACE(SINK_TRACE_REFLOW,               ("HTMLContentSink::DidBuildModel: layout final content"));    mCurrentContext->FlushTags(PR_TRUE);  }  else if (!mLayoutStarted) {    // We never saw the body, and layout never got started. Force    // layout *now*, to get an initial reflow.    SINK_TRACE(SINK_TRACE_REFLOW,               ("HTMLContentSink::DidBuildModel: forcing reflow on empty document"));    StartLayout();  }  ScrollToRef();  nsCOMPtr<nsIScriptLoader> loader;  mDocument->GetScriptLoader(getter_AddRefs(loader));  if (loader) {    loader->RemoveObserver(this);  }    mDocument->EndLoad();  // Ref. Bug 49115  // Do this hack to make sure that the parser  // doesn't get destroyed, accidently, before   // the circularity, between sink & parser, is  // actually borken.   nsCOMPtr<nsIParser> kungFuDeathGrip(mParser);  // Drop our reference to the parser to get rid of a circular  // reference.  NS_IF_RELEASE(mParser);  return NS_OK;}