From 485ab5e6ec4022483d9258bdb4dde4786437e336 Mon Sep 17 00:00:00 2001 From: "rpotts%netscape.com" Date: Thu, 24 Aug 2000 00:08:15 +0000 Subject: [PATCH] bug #39381. The last channel in a document was not firing a request done notification - only a document done... --- uriloader/base/nsDocLoader.cpp | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/uriloader/base/nsDocLoader.cpp b/uriloader/base/nsDocLoader.cpp index a629ef5ef63..1012cfb1b85 100644 --- a/uriloader/base/nsDocLoader.cpp +++ b/uriloader/base/nsDocLoader.cpp @@ -534,17 +534,20 @@ nsDocLoaderImpl::OnStopRequest(nsIChannel *aChannel, } } + // + // Fire the OnStateChange(...) notification for stop request + // + doStopURLLoad(aChannel, aStatus); + FireOnEndURLLoad(this, aChannel, aStatus); + rv = mLoadGroup->GetActiveCount(&count); if (NS_FAILED(rv)) return rv; // // The load group for this DocumentLoader is idle... // - if (0 == count) + if (0 == count) { DocLoaderIsEmpty(aStatus); - else { - doStopURLLoad(aChannel, aStatus); - FireOnEndURLLoad(this, aChannel, aStatus); } } else { @@ -569,16 +572,6 @@ nsresult nsDocLoaderImpl::RemoveChildGroup(nsDocLoaderImpl* aLoader) void nsDocLoaderImpl::DocLoaderIsEmpty(nsresult aStatus) { -#if 0 - if (mParent) { - mParent->DocLoaderIsEmpty(aStatus); - // - // New code to break the circular reference between - // the load group and the docloader... - // - mLoadGroup->SetDefaultLoadChannel(nsnull); - } -#endif /* 0 */ if (mIsLoadingDocument) { PRBool busy = PR_FALSE; /* In the unimagineably rude circumstance that onload event handlers @@ -705,7 +698,6 @@ void nsDocLoaderImpl::doStopDocumentLoad(nsIChannel* aChannel, aChannel, nsIWebProgressListener::flag_stop | nsIWebProgressListener::flag_is_document | - nsIWebProgressListener::flag_is_request | nsIWebProgressListener::flag_is_network, aStatus); }