if (mTitle.IsEmpty()) {
if (mTitle.IsVoid()) {
HTMLContentSink::DidBuildModel(void){  // 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 (mTitle.IsEmpty()) {    nsCOMPtr<nsIDOMHTMLDocument> domDoc(do_QueryInterface(mHTMLDocument));    if (domDoc)      domDoc->SetTitle(mTitle);  }  // 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"));    // NOTE: only force the layout if we are NOT destroying the    // docshell. If we are destroying it, then starting layout will    // likely cause us to crash, or at best waste a lot of time as we    // are just going to tear it down anyway.    PRBool bDestroying = PR_TRUE;    if (mDocShell) {      mDocShell->IsBeingDestroyed(&bDestroying);    }    if (!bDestroying) {      StartLayout();    }  }  if (mDocShell) {    PRUint32 LoadType = 0;    mDocShell->GetLoadType(&LoadType);    if (ScrollToRef(!(LoadType & nsIDocShell::LOAD_CMD_HISTORY))) {      mScrolledToRefAlready = PR_TRUE;    }  }  nsIScriptLoader *loader = mDocument->GetScriptLoader();  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.  mParser = nsnull;  if (mFlags & NS_SINK_FLAG_DYNAMIC_LOWER_VALUE) {    // Reset the performance hint which was set to FALSE    // when NS_SINK_FLAG_DYNAMIC_LOWER_VALUE was set.     PL_FavorPerformanceHint(PR_TRUE , 0);  }  if (mFlags & NS_SINK_FLAG_CAN_INTERRUPT_PARSER) {    // Note: Don't return value from RemoveDummyParserRequest,    // If RemoveDummyParserRequests fails it should not affect    // DidBuildModel. The remove can fail if the parser request    // was already removed by a DummyParserRequest::Cancel    RemoveDummyParserRequest();  }  return NS_OK;}