Fix a download bug.

This commit is contained in:
blakeross%telocity.com 2002-12-07 18:01:19 +00:00
parent dd986e6f63
commit ef2d4fb2d5

View File

@ -513,6 +513,7 @@ nsDownloadManager::AddDownload(nsIURI* aSource,
}
mCurrDownloads.Put(&key, *aDownload);
gObserverService->NotifyObservers(*aDownload, "dl-start", nsnull);
return rv;
}
@ -1011,10 +1012,8 @@ nsDownload::OnStateChange(nsIWebProgress* aWebProgress,
nsIRequest* aRequest, PRUint32 aStateFlags,
nsresult aStatus)
{
if (aStateFlags & STATE_START) {
gObserverService->NotifyObservers(NS_STATIC_CAST(nsIDownload *, this), "dl-start", nsnull);
mStartTime = PR_Now();
}
if (aStateFlags & STATE_START)
mStartTime = PR_Now();
if (mListener)
mListener->OnStateChange(aWebProgress, aRequest, aStateFlags, aStatus);