Bug 1289283 - Define the lazy service getters at the beginning of the appUpdater function to ensure that they are available to any code that may reference them. r=Gijs

MozReview-Commit-ID: 1YVOCdqkNjd

--HG--
extra : rebase_source : c04953f2f8eee54020dbc1863070abaaac107653
This commit is contained in:
Jared Wein 2016-07-26 01:10:49 -04:00
Родитель d19b17ffc3
Коммит dfb63fc6e1
1 изменённых файлов: 10 добавлений и 10 удалений

Просмотреть файл

@ -26,6 +26,16 @@ function onUnload(aEvent) {
function appUpdater()
{
XPCOMUtils.defineLazyServiceGetter(this, "aus",
"@mozilla.org/updates/update-service;1",
"nsIApplicationUpdateService");
XPCOMUtils.defineLazyServiceGetter(this, "checker",
"@mozilla.org/updates/update-checker;1",
"nsIUpdateChecker");
XPCOMUtils.defineLazyServiceGetter(this, "um",
"@mozilla.org/updates/update-manager;1",
"nsIUpdateManager");
this.updateDeck = document.getElementById("updateDeck");
// Hide the update deck when the update window is already open and it's not
@ -38,16 +48,6 @@ function appUpdater()
return;
}
XPCOMUtils.defineLazyServiceGetter(this, "aus",
"@mozilla.org/updates/update-service;1",
"nsIApplicationUpdateService");
XPCOMUtils.defineLazyServiceGetter(this, "checker",
"@mozilla.org/updates/update-checker;1",
"nsIUpdateChecker");
XPCOMUtils.defineLazyServiceGetter(this, "um",
"@mozilla.org/updates/update-manager;1",
"nsIUpdateManager");
this.bundle = Services.strings.
createBundle("chrome://browser/locale/browser.properties");