Bug 1102131 - Part 6: Remove deprecated let block in DownloadsCommon.jsm. r=mak

--HG--
extra : rebase_source : d8b36142d84edf02fd88cb303b7fa61140bccc48
This commit is contained in:
Chris Peterson 2014-11-19 23:50:58 -08:00
parent 6e2ef091e8
commit 9d28632ec4

View File

@ -413,13 +413,12 @@ this.DownloadsCommon = {
if (shouldApplySmoothing) {
// Apply hysteresis to favor downward over upward swings. Trust only 30%
// of the new value if lower, and 10% if higher (exponential smoothing).
let (diff = aSeconds - aLastSeconds) {
aSeconds = aLastSeconds + (diff < 0 ? .3 : .1) * diff;
}
let diff = aSeconds - aLastSeconds;
aSeconds = aLastSeconds + (diff < 0 ? .3 : .1) * diff;
// If the new time is similar, reuse something close to the last time
// left, but subtract a little to provide forward progress.
let diff = aSeconds - aLastSeconds;
diff = aSeconds - aLastSeconds;
let diffPercent = diff / aLastSeconds * 100;
if (Math.abs(diff) < 5 || Math.abs(diffPercent) < 5) {
aSeconds = aLastSeconds - (diff < 0 ? .4 : .2);