mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 813778: Don't attempt to retry when a FOTA update fails to apply in B2G. r=bbondy
This commit is contained in:
parent
0425772b89
commit
fb3ce1f70b
@ -1025,15 +1025,28 @@ function readStringFromFile(file) {
|
||||
|
||||
function handleUpdateFailure(update, errorCode) {
|
||||
update.errorCode = parseInt(errorCode);
|
||||
if (update.errorCode == FOTA_GENERAL_ERROR ||
|
||||
update.errorCode == FOTA_UNKNOWN_ERROR) {
|
||||
// In the case of FOTA update errors, don't reset the state to pending. This
|
||||
// causes the FOTA update path to try again, which is not necessarily what
|
||||
// we want.
|
||||
update.statusText = gUpdateBundle.GetStringFromName("statusFailed");
|
||||
|
||||
Cc["@mozilla.org/updates/update-prompt;1"].
|
||||
createInstance(Ci.nsIUpdatePrompt).
|
||||
showUpdateError(update);
|
||||
writeStatusFile(getUpdatesDir(), STATE_FAILED + ": " + errorCode);
|
||||
cleanupActiveUpdate();
|
||||
return true;
|
||||
}
|
||||
|
||||
if (update.errorCode == WRITE_ERROR ||
|
||||
update.errorCode == WRITE_ERROR_ACCESS_DENIED ||
|
||||
update.errorCode == WRITE_ERROR_SHARING_VIOLATION_SIGNALED ||
|
||||
update.errorCode == WRITE_ERROR_SHARING_VIOLATION_NOPROCESSFORPID ||
|
||||
update.errorCode == WRITE_ERROR_SHARING_VIOLATION_NOPID ||
|
||||
update.errorCode == WRITE_ERROR_CALLBACK_APP ||
|
||||
update.errorCode == FILESYSTEM_MOUNT_READWRITE_ERROR ||
|
||||
update.errorCode == FOTA_GENERAL_ERROR ||
|
||||
update.errorCode == FOTA_UNKNOWN_ERROR) {
|
||||
update.errorCode == FILESYSTEM_MOUNT_READWRITE_ERROR) {
|
||||
Cc["@mozilla.org/updates/update-prompt;1"].
|
||||
createInstance(Ci.nsIUpdatePrompt).
|
||||
showUpdateError(update);
|
||||
|
Loading…
Reference in New Issue
Block a user