nsAutoString typeStr; type->ToString(typeStr);
nsAutoString typeStr(NS_LITERAL_STRING("unknown")); if (type) type->ToString(typeStr);
PresShell::ReflowCommandAdded(nsIReflowCommand* aRC){  if (gAsyncReflowDuringDocLoad) {    NS_PRECONDITION(mRCCreatedDuringLoad >= 0, "PresShell's reflow command queue is in a bad state.");    if (mDocumentLoading) {      PRInt32 flags;      aRC->GetFlags(&flags);      flags |= NS_RC_CREATED_DURING_DOCUMENT_LOAD;      aRC->SetFlags(flags);          mRCCreatedDuringLoad++;#ifdef PR_LOGGING      if (PR_LOG_TEST(gLog, PR_LOG_DEBUG)) {        nsIFrame* target;        aRC->GetTarget(target);        nsCOMPtr<nsIAtom> type;        target->GetFrameType(getter_AddRefs(type));        nsAutoString typeStr;        type->ToString(typeStr);        PR_LOG(gLog, PR_LOG_DEBUG,               ("presshell=%p, ReflowCommandAdded(%p) target=%p[%s] mRCCreatedDuringLoad=%d\n",                this, aRC, target, NS_ConvertUCS2toUTF8(typeStr).get(), mRCCreatedDuringLoad));      }#endif      if (!mDummyLayoutRequest) {        AddDummyLayoutRequest();      }    }  }  return NS_OK;}