diff --git a/browser/base/content/aboutDialog.js b/browser/base/content/aboutDialog.js index dd9478b998132..853d568c68d41 100644 --- a/browser/base/content/aboutDialog.js +++ b/browser/base/content/aboutDialog.js @@ -40,6 +40,8 @@ // Services = object with smart getters for common XPCOM services Components.utils.import("resource://gre/modules/Services.jsm"); +const PREF_EM_HOTFIX_ID = "extensions.hotfix.id"; + function init(aEvent) { if (aEvent.target != document) @@ -378,6 +380,11 @@ appUpdater.prototype = * Checks the compatibility of add-ons for the application update. */ checkAddonCompatibility: function() { + try { + var hotfixID = Services.prefs.getCharPref(PREF_EM_HOTFIX_ID); + } + catch (e) { } + var self = this; AddonManager.getAllAddons(function(aAddons) { self.addons = []; @@ -402,9 +409,10 @@ appUpdater.prototype = // incompatible. If an addon's type equals plugin it is skipped since // checking plugins compatibility information isn't supported and // getting the scope property of a plugin breaks in some environments - // (see bug 566787). + // (see bug 566787). The hotfix add-on is also ignored as it shouldn't + // block the user from upgrading. try { - if (aAddon.type != "plugin" && + if (aAddon.type != "plugin" && aAddon.id != hotfixID && !aAddon.appDisabled && !aAddon.userDisabled && aAddon.scope != AddonManager.SCOPE_APPLICATION && aAddon.isCompatible && diff --git a/toolkit/mozapps/extensions/content/update.js b/toolkit/mozapps/extensions/content/update.js index 393548c53f5bc..3e664c70d4cfe 100644 --- a/toolkit/mozapps/extensions/content/update.js +++ b/toolkit/mozapps/extensions/content/update.js @@ -42,6 +42,7 @@ const PREF_UPDATE_EXTENSIONS_ENABLED = "extensions.update.enabled"; const PREF_XPINSTALL_ENABLED = "xpinstall.enabled"; +const PREF_EM_HOTFIX_ID = "extensions.hotfix.id"; Components.utils.import("resource://gre/modules/Services.jsm"); Components.utils.import("resource://gre/modules/AddonManager.jsm"); @@ -159,10 +160,15 @@ var gVersionInfoPage = { "nextButtonText", true, "cancelButtonText", false); + try { + var hotfixID = Services.prefs.getCharPref(PREF_EM_HOTFIX_ID); + } + catch (e) { } + // Retrieve all add-ons in order to sync their app compatibility information AddonManager.getAllAddons(function(aAddons) { gUpdateWizard.addons = aAddons.filter(function(a) { - return a.type != "plugin"; + return a.type != "plugin" && a.id != hotfixID; }); gVersionInfoPage._totalCount = gUpdateWizard.addons.length; diff --git a/toolkit/mozapps/update/content/updates.js b/toolkit/mozapps/update/content/updates.js index 1b9478c3b538b..7ddd9cf0f07d6 100644 --- a/toolkit/mozapps/update/content/updates.js +++ b/toolkit/mozapps/update/content/updates.js @@ -60,6 +60,8 @@ const PREF_APP_UPDATE_NEVER_BRANCH = "app.update.never."; const PREF_APP_UPDATE_TEST_LOOP = "app.update.test.loop"; const PREF_PLUGINS_UPDATEURL = "plugins.update.url"; +const PREF_EM_HOTFIX_ID = "extensions.hotfix.id"; + const UPDATE_TEST_LOOP_INTERVAL = 2000; const URI_UPDATES_PROPERTIES = "chrome://mozapps/locale/update/updates.properties"; @@ -521,6 +523,11 @@ var gUpdates = { return; } + try { + var hotfixID = Services.prefs.getCharPref(PREF_EM_HOTFIX_ID); + } + catch (e) { } + var self = this; AddonManager.getAllAddons(function(addons) { self.addons = []; @@ -544,9 +551,10 @@ var gUpdates = { // incompatible. If an addon's type equals plugin it is skipped since // checking plugins compatibility information isn't supported and // getting the scope property of a plugin breaks in some environments - // (see bug 566787). + // (see bug 566787). The hotfix add-on is also ignored as it shouldn't + // block the user from upgrading. try { - if (addon.type != "plugin" && + if (addon.type != "plugin" && addon.id != hotfixID && !addon.appDisabled && !addon.userDisabled && addon.scope != AddonManager.SCOPE_APPLICATION && addon.isCompatible && diff --git a/toolkit/mozapps/update/nsUpdateService.js b/toolkit/mozapps/update/nsUpdateService.js index b2ec5e134e8b8..9bc1f4b3c1375 100644 --- a/toolkit/mozapps/update/nsUpdateService.js +++ b/toolkit/mozapps/update/nsUpdateService.js @@ -86,6 +86,8 @@ const PREF_PARTNER_BRANCH = "app.partner."; const PREF_APP_DISTRIBUTION = "distribution.id"; const PREF_APP_DISTRIBUTION_VERSION = "distribution.version"; +const PREF_EM_HOTFIX_ID = "extensions.hotfix.id"; + const URI_UPDATE_PROMPT_DIALOG = "chrome://mozapps/content/update/updates.xul"; const URI_UPDATE_HISTORY_DIALOG = "chrome://mozapps/content/update/history.xul"; const URI_BRAND_PROPERTIES = "chrome://branding/locale/brand.properties"; @@ -1657,6 +1659,11 @@ UpdateService.prototype = { }, _checkAddonCompatibility: function AUS__checkAddonCompatibility() { + try { + var hotfixID = Services.prefs.getCharPref(PREF_EM_HOTFIX_ID); + } + catch (e) { } + // Get all the installed add-ons var self = this; AddonManager.getAllAddons(function(addons) { @@ -1681,9 +1688,10 @@ UpdateService.prototype = { // incompatible. If an addon's type equals plugin it is skipped since // checking plugins compatibility information isn't supported and // getting the scope property of a plugin breaks in some environments - // (see bug 566787). + // (see bug 566787). The hotfix add-on is also ignored as it shouldn't + // block the user from upgrading. try { - if (addon.type != "plugin" && + if (addon.type != "plugin" && addon.id != hotfixID && !addon.appDisabled && !addon.userDisabled && addon.scope != AddonManager.SCOPE_APPLICATION && addon.isCompatible && diff --git a/toolkit/mozapps/update/test/chrome/utils.js b/toolkit/mozapps/update/test/chrome/utils.js index edbb262c8797e..d870873248390 100644 --- a/toolkit/mozapps/update/test/chrome/utils.js +++ b/toolkit/mozapps/update/test/chrome/utils.js @@ -146,12 +146,13 @@ const ADDON_PREP_DIR = "appupdateprep"; // Preference for storing add-ons that are disabled by the tests to prevent them // from interefering with the tests. const PREF_DISABLEDADDONS = "app.update.test.disabledAddons"; +const PREF_EM_HOTFIX_ID = "extensions.hotfix.id"; const TEST_ADDONS = [ "appdisabled_1", "appdisabled_2", "compatible_1", "compatible_2", "noupdate_1", "noupdate_2", "updatecompatibility_1", "updatecompatibility_2", "updateversion_1", "updateversion_2", - "userdisabled_1", "userdisabled_2" ]; + "userdisabled_1", "userdisabled_2", "hotfix" ]; const TEST_TIMEOUT = 25000; // 25 seconds @@ -817,6 +818,7 @@ function setupPrefs() { Services.prefs.setIntPref(PREF_APP_UPDATE_IDLETIME, 0); Services.prefs.setIntPref(PREF_APP_UPDATE_PROMPTWAITTIME, 0); Services.prefs.setBoolPref(PREF_EXTENSIONS_STRICT_COMPAT, true); + Services.prefs.setCharPref(PREF_EM_HOTFIX_ID, "hotfix" + ADDON_ID_SUFFIX); } /** @@ -918,6 +920,10 @@ function resetPrefs() { if (Services.prefs.prefHasUserValue(PREF_EXTENSIONS_STRICT_COMPAT)) { Services.prefs.clearUserPref(PREF_EXTENSIONS_STRICT_COMPAT); } + + if (Services.prefs.prefHasUserValue(PREF_EM_HOTFIX_ID)) { + Services.prefs.clearUserPref(PREF_EM_HOTFIX_ID); + } } /**