("DocLoader - LoadDocument(...) called for %s.", buffer));
("DocLoader:%p: LoadDocument(...) called for %s.", this, buffer));
nsDocLoaderImpl::LoadDocument(const nsString& aURLSpec,                               const char* aCommand,                              nsIContentViewerContainer* aContainer,                              nsIPostData* aPostData,                              nsISupports* aExtraInfo,                              nsIStreamObserver* anObserver,                              nsURLReloadType aType,                              const PRUint32 aLocalIP){  nsresult rv;  nsURLLoadType loadType;  nsDocumentBindInfo* loader = nsnull;#if defined(DEBUG)  char buffer[256];  aURLSpec.ToCString(buffer, sizeof(buffer));  PR_LOG(gDocLoaderLog, PR_LOG_DEBUG,          ("DocLoader - LoadDocument(...) called for %s.",           buffer));#endif /* DEBUG */  /* Check for initial error conditions... */  if (nsnull == aContainer) {      rv = NS_ERROR_NULL_POINTER;      goto done;  }  NS_NEWXPCOM(loader, nsDocumentBindInfo);  if (nsnull == loader) {      rv = NS_ERROR_OUT_OF_MEMORY;      goto done;  }  loader->Init(this,           // DocLoader               aCommand,       // Command               aContainer,     // Viewer Container               aExtraInfo,     // Extra Info               anObserver);    // Observer  /* The DocumentBindInfo reference is only held by the Array... */  m_LoadingDocsList->AppendElement((nsIStreamListener *)loader);  /* Initialize the URL counters... */  NS_PRECONDITION(((mTotalURLs == 0) && (mForegroundURLs == 0)), "DocuemntLoader is busy...");  rv = m_LoadAttrib->GetLoadType(&loadType);  if (NS_FAILED(rv)) {    loadType = nsURLLoadNormal;  }  if (nsURLLoadBackground != loadType) {    mForegroundURLs = 1;  }  mTotalURLs = 1;  /*   * Set the flag indicating that the document loader is in the process of   * loading a document.  This flag will remain set until the    * OnConnectionsComplete(...) notification is fired for the loader...   */  mIsLoadingDocument = PR_TRUE;  m_LoadAttrib->SetReloadType(aType);  // If we've got special loading instructions, mind them.  if ((aType == nsURLReloadBypassProxy) ||       (aType == nsURLReloadBypassCacheAndProxy)) {      m_LoadAttrib->SetBypassProxy(PR_TRUE);  }  if ( aLocalIP ) {      m_LoadAttrib->SetLocalIP(aLocalIP);  }  NS_IF_RELEASE(mStreamObserver);  mStreamObserver = anObserver;  NS_IF_ADDREF(mStreamObserver);  rv = loader->Bind(aURLSpec, aPostData, nsnull);done:  return rv;}