Bug 348925: Transferred data column isn't updated when download finishes (xpfe patch). Patch by Son Le <son.le0@gmail.com>, r=cbiesinger, sr=neil

This commit is contained in:
ajschult%verizon.net 2006-09-30 02:18:46 +00:00
Родитель d082190de3
Коммит d93cbcb483
1 изменённых файлов: 4 добавлений и 3 удалений

Просмотреть файл

@ -1041,10 +1041,11 @@ nsDownload::OnProgressChange64(nsIWebProgress *aWebProgress,
if (!mRequest)
mRequest = aRequest; // used for pause/resume
// filter notifications since they come in so frequently
// Filter notifications since they come in so frequently, but we want to
// process the last notification.
PRTime now = PR_Now();
nsInt64 delta = now - mLastUpdate;
if (delta < gInterval)
if (delta < gInterval && aCurTotalProgress != aMaxTotalProgress)
return NS_OK;
mLastUpdate = now;
@ -1238,7 +1239,7 @@ nsDownload::OnStateChange(nsIWebProgress* aWebProgress,
if (mDownloadState == DOWNLOADING || mDownloadState == NOTSTARTED) {
mDownloadState = FINISHED;
// Set file size at the end of a tranfer (for unknown transfer amounts)
// Set file size at the end of a transfer (for unknown transfer amounts)
if (mMaxBytes == -1)
mMaxBytes = mCurrBytes;