зеркало из https://github.com/mozilla/gecko-dev.git
Bug 929067 - Canceling a download from the Downloads Panel sometimes pauses it instead. r=enn
This commit is contained in:
Родитель
ea866fc435
Коммит
54e64db5f8
|
@ -363,19 +363,22 @@ this.Download.prototype = {
|
|||
|
||||
// This function propagates progress from the DownloadSaver object, unless
|
||||
// it comes in late from a download attempt that was replaced by a new one.
|
||||
// If the cancellation process for the download has started, then the update
|
||||
// is ignored.
|
||||
function DS_setProgressBytes(aCurrentBytes, aTotalBytes, aHasPartialData)
|
||||
{
|
||||
if (this._currentAttempt == currentAttempt || !this._currentAttempt) {
|
||||
if (this._currentAttempt == currentAttempt) {
|
||||
this._setBytes(aCurrentBytes, aTotalBytes, aHasPartialData);
|
||||
}
|
||||
}
|
||||
|
||||
// This function propagates download properties from the DownloadSaver
|
||||
// object, unless it comes in late from a download attempt that was
|
||||
// replaced by a new one.
|
||||
// replaced by a new one. If the cancellation process for the download has
|
||||
// started, then the update is ignored.
|
||||
function DS_setProperties(aOptions)
|
||||
{
|
||||
if (this._currentAttempt && this._currentAttempt != currentAttempt) {
|
||||
if (this._currentAttempt != currentAttempt) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче