diff options
Diffstat (limited to 'toolkit')
-rw-r--r-- | toolkit/forgetaboutsite/ForgetAboutSite.jsm | 2 | ||||
-rw-r--r-- | toolkit/mozapps/update/nsUpdateService.js | 14 |
2 files changed, 9 insertions, 7 deletions
diff --git a/toolkit/forgetaboutsite/ForgetAboutSite.jsm b/toolkit/forgetaboutsite/ForgetAboutSite.jsm index b8cd31ad9..5250ca75d 100644 --- a/toolkit/forgetaboutsite/ForgetAboutSite.jsm +++ b/toolkit/forgetaboutsite/ForgetAboutSite.jsm @@ -126,7 +126,7 @@ this.ForgetAboutSite = { // XXXehsan: is there a better way to do this rather than this // hacky comparison? catch (ex) { - if (ex.message.indexOf("User canceled Master Password entry") == -1) { + if (!ex.message.includes("User canceled Master Password entry")) { throw ex; } } diff --git a/toolkit/mozapps/update/nsUpdateService.js b/toolkit/mozapps/update/nsUpdateService.js index 10eb1d100..e23ab3f40 100644 --- a/toolkit/mozapps/update/nsUpdateService.js +++ b/toolkit/mozapps/update/nsUpdateService.js @@ -2395,14 +2395,16 @@ UpdateService.prototype = { let lastCheckCode = AUSTLMY.CHK_NO_COMPAT_UPDATE_FOUND; updates.forEach(function(aUpdate) { - // Ignore updates for older versions of the application and updates for - // the same version of the application with the same build ID. + // Ignore updates for older versions of the applications and updates for + // the same version or build id of the application if (vc.compare(aUpdate.appVersion, Services.appinfo.version) < 0 || - vc.compare(aUpdate.appVersion, Services.appinfo.version) == 0 && - aUpdate.buildID == Services.appinfo.appBuildID) { + (vc.compare(aUpdate.appVersion, Services.appinfo.version) == 0 && + aUpdate.buildID <= Services.appinfo.appBuildID) || + (vc.compare(aUpdate.appVersion, Services.appinfo.version) == 0 && + aUpdate.buildID == undefined)) { LOG("UpdateService:selectUpdate - skipping update because the " + - "update's application version is less than the current " + - "application version"); + "update's application version is less than or equal to " + + "the current application version."); lastCheckCode = AUSTLMY.CHK_UPDATE_PREVIOUS_VERSION; return; } |