for (index = 0; index < count; index++) { nsIDocumentLoaderObserver* observer = (nsIDocumentLoaderObserver*)mDocObservers.ElementAt(index); observer->OnEndURLLoad(aURL, aStatus);
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->OnEndURLLoad(aLoadInitiator, aChannel, aStatus);
void nsDocLoaderImpl::FireOnEndURLLoad(nsIURL* aURL, PRInt32 aStatus){  PRInt32 count = mDocObservers.Count();  PRInt32 index;  /*   * First notify any observers that the URL load has begun...   */  for (index = 0; index < count; index++) {    nsIDocumentLoaderObserver* observer = (nsIDocumentLoaderObserver*)mDocObservers.ElementAt(index);    observer->OnEndURLLoad(aURL, aStatus);  }  /*   * Finally notify the parent...   */  if (nsnull != mParent) {    mParent->FireOnEndURLLoad(aURL, aStatus);  }}