Work around a flaw in the doc-loader not handling a RemoveObserver call during an observer notification

This commit is contained in:
kipp%netscape.com 1999-10-05 23:57:20 +00:00
parent 8bf8ba207a
commit dd815430d4
2 changed files with 10 additions and 6 deletions

View File

@ -864,9 +864,11 @@ void nsDocLoaderImpl::FireOnEndDocumentLoad(nsDocLoaderImpl* aLoadInitiator,
for (index = 0; index < count; index++) {
nsIDocumentLoaderObserver* observer = (nsIDocumentLoaderObserver*)
mDocObservers.ElementAt(index);
observer->OnEndDocumentLoad(aLoadInitiator,
aDocChannel,
aStatus, observer);
if (observer) {
observer->OnEndDocumentLoad(aLoadInitiator,
aDocChannel,
aStatus, observer);
}
}
/*
* Next notify the parent...

View File

@ -864,9 +864,11 @@ void nsDocLoaderImpl::FireOnEndDocumentLoad(nsDocLoaderImpl* aLoadInitiator,
for (index = 0; index < count; index++) {
nsIDocumentLoaderObserver* observer = (nsIDocumentLoaderObserver*)
mDocObservers.ElementAt(index);
observer->OnEndDocumentLoad(aLoadInitiator,
aDocChannel,
aStatus, observer);
if (observer) {
observer->OnEndDocumentLoad(aLoadInitiator,
aDocChannel,
aStatus, observer);
}
}
/*
* Next notify the parent...