зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1272585: Start handling NS_ERROR_DOCUMENT_NOT_CACHED the same way as network offline in app update. r=mhowell
This commit is contained in:
Родитель
9f20364a07
Коммит
36a128ce82
|
@ -4211,13 +4211,15 @@ Downloader.prototype = {
|
|||
AUSTLMY.DWNLD_RETRY_OFFLINE);
|
||||
shouldRegisterOnlineObserver = true;
|
||||
deleteActiveUpdate = false;
|
||||
// Each of NS_ERROR_NET_TIMEOUT, ERROR_CONNECTION_REFUSED, and
|
||||
// NS_ERROR_NET_RESET can be returned when disconnecting the internet while
|
||||
// a download of a MAR is in progress. There may be others but I have not
|
||||
// encountered them during testing.
|
||||
// Each of NS_ERROR_NET_TIMEOUT, ERROR_CONNECTION_REFUSED,
|
||||
// NS_ERROR_NET_RESET and NS_ERROR_DOCUMENT_NOT_CACHED can be returned
|
||||
// when disconnecting the internet while a download of a MAR is in
|
||||
// progress. There may be others but I have not encountered them during
|
||||
// testing.
|
||||
} else if ((status == Cr.NS_ERROR_NET_TIMEOUT ||
|
||||
status == Cr.NS_ERROR_CONNECTION_REFUSED ||
|
||||
status == Cr.NS_ERROR_NET_RESET) &&
|
||||
status == Cr.NS_ERROR_NET_RESET ||
|
||||
status == Cr.NS_ERROR_DOCUMENT_NOT_CACHED) &&
|
||||
this.updateService._consecutiveSocketErrors < maxFail) {
|
||||
LOG("Downloader:onStopRequest - socket error, shouldRetrySoon: true");
|
||||
let dwnldCode = AUSTLMY.DWNLD_RETRY_CONNECTION_REFUSED;
|
||||
|
@ -4225,18 +4227,17 @@ Downloader.prototype = {
|
|||
dwnldCode = AUSTLMY.DWNLD_RETRY_NET_TIMEOUT;
|
||||
} else if (status == Cr.NS_ERROR_NET_RESET) {
|
||||
dwnldCode = AUSTLMY.DWNLD_RETRY_NET_RESET;
|
||||
} else if (status == Cr.NS_ERROR_DOCUMENT_NOT_CACHED) {
|
||||
dwnldCode = AUSTLMY.DWNLD_ERR_DOCUMENT_NOT_CACHED;
|
||||
}
|
||||
AUSTLMY.pingDownloadCode(this.isCompleteUpdate, dwnldCode);
|
||||
shouldRetrySoon = true;
|
||||
deleteActiveUpdate = false;
|
||||
} else if (status != Cr.NS_BINDING_ABORTED &&
|
||||
status != Cr.NS_ERROR_ABORT &&
|
||||
status != Cr.NS_ERROR_DOCUMENT_NOT_CACHED) {
|
||||
status != Cr.NS_ERROR_ABORT) {
|
||||
LOG("Downloader:onStopRequest - non-verification failure");
|
||||
let dwnldCode = AUSTLMY.DWNLD_ERR_DOCUMENT_NOT_CACHED;
|
||||
if (status == Cr.NS_BINDING_ABORTED) {
|
||||
dwnldCode = AUSTLMY.DWNLD_ERR_BINDING_ABORTED;
|
||||
} else if (status == Cr.NS_ERROR_ABORT) {
|
||||
let dwnldCode = AUSTLMY.DWNLD_ERR_BINDING_ABORTED;
|
||||
if (status == Cr.NS_ERROR_ABORT) {
|
||||
dwnldCode = AUSTLMY.DWNLD_ERR_ABORT;
|
||||
}
|
||||
AUSTLMY.pingDownloadCode(this.isCompleteUpdate, dwnldCode);
|
||||
|
|
Загрузка…
Ссылка в новой задаче