summaryrefslogtreecommitdiff
path: root/embed/mozilla/MozDownload.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'embed/mozilla/MozDownload.cpp')
-rw-r--r--embed/mozilla/MozDownload.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/embed/mozilla/MozDownload.cpp b/embed/mozilla/MozDownload.cpp
index 6839e870d..b5ecb97b9 100644
--- a/embed/mozilla/MozDownload.cpp
+++ b/embed/mozilla/MozDownload.cpp
@@ -300,6 +300,15 @@ MozDownload::OnProgressChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest
PRInt32 aCurSelfProgress, PRInt32 aMaxSelfProgress,
PRInt32 aCurTotalProgress, PRInt32 aMaxTotalProgress)
{
+ PRInt64 now = PR_Now ();
+
+ if ((now - mLastUpdate < mInterval) &&
+ (aMaxTotalProgress != -1) &&
+ (aCurTotalProgress < aMaxTotalProgress))
+ return NS_OK;
+
+ mLastUpdate = now;
+
if (mUserCanceled) {
if (mHelperAppLauncher)
mHelperAppLauncher->Cancel();