NS_PRECONDITION((0 == mChildGroupList.Count()), "Document loader has children...");
PRUint32 count=0; mChildList->Count(&count);   if (count > 0) { for (PRUint32 i=0; i<count; i++) { nsCOMPtr<nsIDocumentLoader> loader; loader = getter_AddRefs(NS_STATIC_CAST(nsIDocumentLoader*, mChildList->ElementAt(i)));  if (loader) loader->ClearParentDocLoader(); } mChildList->Clear(); }
nsDocLoaderImpl::~nsDocLoaderImpl(){  Stop();  if (nsnull != mParent) {    mParent->RemoveChildGroup(this);    NS_RELEASE(mParent);  }  NS_IF_RELEASE(m_LoadingDocsList);  NS_IF_RELEASE(m_DocFactory);  NS_IF_RELEASE(m_LoadAttrib);  NS_IF_RELEASE(mStreamObserver);  NS_IF_RELEASE(mContainer);  NS_IF_RELEASE(mDocumentUrl);  PR_LOG(gDocLoaderLog, PR_LOG_DEBUG,          ("DocLoader - DocLoader [%p] deleted.\n", this));  NS_PRECONDITION((0 == mChildGroupList.Count()), "Document loader has children...");}