зеркало из https://github.com/mozilla/pjs.git
bug #14457. Getting the webcrawler working again for QA...
This commit is contained in:
Родитель
c61427488f
Коммит
c924d68b90
|
@ -248,6 +248,7 @@ public:
|
|||
nsIURI* aURL,
|
||||
const char* aCommand);
|
||||
void FireOnEndDocumentLoad(nsDocLoaderImpl* aLoadInitiator,
|
||||
nsIChannel *aDocChannel,
|
||||
nsresult aStatus);
|
||||
|
||||
|
||||
|
@ -752,11 +753,20 @@ nsDocLoaderImpl::OnStopRequest(nsIChannel *channel, nsISupports *ctxt,
|
|||
// has initiated a load...
|
||||
//
|
||||
if (mIsLoadingDocument) {
|
||||
mIsLoadingDocument = PR_FALSE;
|
||||
FireOnEndDocumentLoad(this, status);
|
||||
}
|
||||
nsCOMPtr<nsIChannel> docChannel(mDocumentChannel);
|
||||
|
||||
mDocumentChannel = null_nsCOMPtr();
|
||||
|
||||
mIsLoadingDocument = PR_FALSE;
|
||||
|
||||
//
|
||||
// Do nothing after firing the OnEndDocumentLoad(...). The document
|
||||
// loader may be loading a *new* document - if LoadDocument()
|
||||
// was called from a handler!
|
||||
//
|
||||
FireOnEndDocumentLoad(this, docChannel, status);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -838,14 +848,15 @@ void nsDocLoaderImpl::FireOnStartDocumentLoad(nsDocLoaderImpl* aLoadInitiator,
|
|||
}
|
||||
|
||||
void nsDocLoaderImpl::FireOnEndDocumentLoad(nsDocLoaderImpl* aLoadInitiator,
|
||||
nsIChannel *aDocChannel,
|
||||
nsresult aStatus)
|
||||
|
||||
{
|
||||
#if defined(DEBUG)
|
||||
nsCOMPtr<nsIURI> uri;
|
||||
nsresult rv = NS_OK;
|
||||
if (aLoadInitiator->mDocumentChannel)
|
||||
rv = aLoadInitiator->mDocumentChannel->GetURI(getter_AddRefs(uri));
|
||||
if (aDocChannel)
|
||||
rv = aDocChannel->GetURI(getter_AddRefs(uri));
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
char* buffer = nsnull;
|
||||
if (uri)
|
||||
|
@ -869,14 +880,14 @@ void nsDocLoaderImpl::FireOnEndDocumentLoad(nsDocLoaderImpl* aLoadInitiator,
|
|||
nsIDocumentLoaderObserver* observer = (nsIDocumentLoaderObserver*)
|
||||
mDocObservers.ElementAt(index);
|
||||
observer->OnEndDocumentLoad(aLoadInitiator,
|
||||
aLoadInitiator->mDocumentChannel,
|
||||
aDocChannel,
|
||||
aStatus, observer);
|
||||
}
|
||||
/*
|
||||
* Next notify the parent...
|
||||
*/
|
||||
if (mParent) {
|
||||
mParent->FireOnEndDocumentLoad(aLoadInitiator, aStatus);
|
||||
mParent->FireOnEndDocumentLoad(aLoadInitiator, aDocChannel, aStatus);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -248,6 +248,7 @@ public:
|
|||
nsIURI* aURL,
|
||||
const char* aCommand);
|
||||
void FireOnEndDocumentLoad(nsDocLoaderImpl* aLoadInitiator,
|
||||
nsIChannel *aDocChannel,
|
||||
nsresult aStatus);
|
||||
|
||||
|
||||
|
@ -752,11 +753,20 @@ nsDocLoaderImpl::OnStopRequest(nsIChannel *channel, nsISupports *ctxt,
|
|||
// has initiated a load...
|
||||
//
|
||||
if (mIsLoadingDocument) {
|
||||
mIsLoadingDocument = PR_FALSE;
|
||||
FireOnEndDocumentLoad(this, status);
|
||||
}
|
||||
nsCOMPtr<nsIChannel> docChannel(mDocumentChannel);
|
||||
|
||||
mDocumentChannel = null_nsCOMPtr();
|
||||
|
||||
mIsLoadingDocument = PR_FALSE;
|
||||
|
||||
//
|
||||
// Do nothing after firing the OnEndDocumentLoad(...). The document
|
||||
// loader may be loading a *new* document - if LoadDocument()
|
||||
// was called from a handler!
|
||||
//
|
||||
FireOnEndDocumentLoad(this, docChannel, status);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -838,14 +848,15 @@ void nsDocLoaderImpl::FireOnStartDocumentLoad(nsDocLoaderImpl* aLoadInitiator,
|
|||
}
|
||||
|
||||
void nsDocLoaderImpl::FireOnEndDocumentLoad(nsDocLoaderImpl* aLoadInitiator,
|
||||
nsIChannel *aDocChannel,
|
||||
nsresult aStatus)
|
||||
|
||||
{
|
||||
#if defined(DEBUG)
|
||||
nsCOMPtr<nsIURI> uri;
|
||||
nsresult rv = NS_OK;
|
||||
if (aLoadInitiator->mDocumentChannel)
|
||||
rv = aLoadInitiator->mDocumentChannel->GetURI(getter_AddRefs(uri));
|
||||
if (aDocChannel)
|
||||
rv = aDocChannel->GetURI(getter_AddRefs(uri));
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
char* buffer = nsnull;
|
||||
if (uri)
|
||||
|
@ -869,14 +880,14 @@ void nsDocLoaderImpl::FireOnEndDocumentLoad(nsDocLoaderImpl* aLoadInitiator,
|
|||
nsIDocumentLoaderObserver* observer = (nsIDocumentLoaderObserver*)
|
||||
mDocObservers.ElementAt(index);
|
||||
observer->OnEndDocumentLoad(aLoadInitiator,
|
||||
aLoadInitiator->mDocumentChannel,
|
||||
aDocChannel,
|
||||
aStatus, observer);
|
||||
}
|
||||
/*
|
||||
* Next notify the parent...
|
||||
*/
|
||||
if (mParent) {
|
||||
mParent->FireOnEndDocumentLoad(aLoadInitiator, aStatus);
|
||||
mParent->FireOnEndDocumentLoad(aLoadInitiator, aDocChannel, aStatus);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче