for (index = 0; index < count; index++) { nsIDocumentLoaderObserver* observer = (nsIDocumentLoaderObserver*) mDocObservers.ElementAt(index); observer->OnEndDocumentLoad(aLoadInitiator, #ifdef NECKO mDocumentChannel, #else mDocumentUrl, #endif aStatus, observer);
GetURIStringFromChannel(aDocChannel, buffer); if (aLoadInitiator == this) { PR_LOG(gDocLoaderLog, PR_LOG_DEBUG, ("DocLoader:%p: ++ Firing OnEndDocumentLoad(...)" "\tURI: %s Status: %x\n", this, (const char *) buffer, aStatus)); } else { PR_LOG(gDocLoaderLog, PR_LOG_DEBUG, ("DocLoader:%p: --   Propagating OnEndDocumentLoad(...)." "DocLoader:%p  URI:%s\n", this, aLoadInitiator, (const char *)buffer)); } #endif    PRInt32 count;  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;
void nsDocLoaderImpl::FireOnEndDocumentLoad(nsIDocumentLoader* aLoadInitiator,                                            PRInt32 aStatus)									{    PRInt32 count = mDocObservers.Count();    PRInt32 index;    /*     * First notify any observers that the document load has finished...     */    for (index = 0; index < count; index++) {        nsIDocumentLoaderObserver* observer = (nsIDocumentLoaderObserver*)            mDocObservers.ElementAt(index);        observer->OnEndDocumentLoad(aLoadInitiator, #ifdef NECKO                                    mDocumentChannel,#else                                    mDocumentUrl,#endif                                    aStatus, observer);    }    /*     * Finally notify the parent...     */    if (nsnull != mParent) {        mParent->ChildDocLoaderFiredEndDocumentLoad(this, aLoadInitiator, aStatus);    }}