GetURIStringFromChannel(aDocChannel, buffer); if (aLoadInitiator == this) { PR_LOG(gDocLoaderLog, PR_LOG_DEBUG, ("DocLoader:%p: ++ Firing OnStartDocumentLoad(...).\tURI: %s\n", this, (const char *) buffer)); } else { PR_LOG(gDocLoaderLog, PR_LOG_DEBUG, ("DocLoader:%p: --   Propagating OnStartDocumentLoad(...)." "DocLoader:%p  URI:%s\n", this, aLoadInitiator, (const char *) buffer)); }
aURL->GetSpec(&buffer); PR_LOG(gDocLoaderLog, PR_LOG_DEBUG, ("DocLoader:%p: Firing OnStartDocumentLoad(...) called for [DocLoader:%p] %s.\n", this, aLoadInitiator, buffer)); nsCRT::free(buffer);
void nsDocLoaderImpl::FireOnStartDocumentLoad(nsDocLoaderImpl* aLoadInitiator,                                              nsIChannel *aDocChannel){  PRInt32 count;  nsCOMPtr<nsIURI> uri;  aDocChannel->GetURI(getter_AddRefs(uri));#if defined(DEBUG)  nsXPIDLCString buffer;  GetURIStringFromChannel(aDocChannel, buffer);  if (aLoadInitiator == this) {    PR_LOG(gDocLoaderLog, PR_LOG_DEBUG,            ("DocLoader:%p: ++ Firing OnStartDocumentLoad(...).\tURI: %s\n",            this, (const char *) buffer));  } else {    PR_LOG(gDocLoaderLog, PR_LOG_DEBUG,            ("DocLoader:%p: --   Propagating OnStartDocumentLoad(...)."            "DocLoader:%p  URI:%s\n",             this, aLoadInitiator, (const char *) buffer));  }#endif /* DEBUG */  /*   * First notify any observers that the document load has begun...   *   * Operate the elements from back to front so that if items get   * get removed from the list it won't affect our iteration   */  count = mDocObservers.Count();  while (count > 0) {    nsIDocumentLoaderObserver *observer;    observer = NS_STATIC_CAST(nsIDocumentLoaderObserver*, mDocObservers.ElementAt(--count));    NS_ASSERTION(observer, "NULL observer found in list.");    if (! observer) {      continue;    }    observer->OnStartDocumentLoad(aLoadInitiator, uri, mCommand);  }  /*   * Finally notify the parent...   */  if (mParent) {    mParent->FireOnStartDocumentLoad(aLoadInitiator, aDocChannel);  }}