Bug 1090450 - Properly check add-on update state during update interval. r=Mossop

A refactoring in bug 995108 inadvertently disabled background add-on updates by
moving the timer handler to AddonManagerPrivate without fixing the values the
method uses to point to meaningful locations.
This commit is contained in:
J. Ryan Stinnett 2014-10-28 20:26:00 -04:00
parent 6324b96351
commit 80db9151e1
2 changed files with 6 additions and 4 deletions

View File

@ -2418,11 +2418,11 @@ this.AddonManagerPrivate = {
backgroundUpdateTimerHandler() {
// Don't call through to the real update check if no checks are enabled.
let checkHotfix = this.hotfixID &&
let checkHotfix = AddonManagerInternal.hotfixID &&
Services.prefs.getBoolPref(PREF_APP_UPDATE_ENABLED) &&
Services.prefs.getBoolPref(PREF_APP_UPDATE_AUTO);
if (!this.updateEnabled && !checkHotfix) {
if (!AddonManagerInternal.updateEnabled && !checkHotfix) {
logger.info("Skipping background update check");
return;
}

View File

@ -44,7 +44,8 @@ function run_test_1() {
do_execute_soon(run_test_2);
}, "addons-background-update-complete", false);
AddonManagerPrivate.backgroundUpdateCheck();
// Trigger the background update timer handler
gInternalManager.notify(null);
});
}
@ -120,5 +121,6 @@ function run_test_2() {
}
});
AddonManagerPrivate.backgroundUpdateCheck();
// Trigger the background update timer handler
gInternalManager.notify(null);
}