Bug 1545879 - Port bug 1520321 and bug 1544562: Changes to Application Updater. r=jorgk
Bug 1520321 - Implement XPCOM interface for interacting with the update agent. Bug 1544562 - aboutDialog-appUpdater's onUnload doesn't run in about:preferences
This commit is contained in:
Родитель
52e5fa2177
Коммит
f8f2933c5a
|
@ -117,6 +117,11 @@ pref("app.update.idletime", 60);
|
|||
pref("app.update.service.enabled", true);
|
||||
#endif
|
||||
|
||||
#ifdef XP_WIN
|
||||
// This pref prevents BITS from being used by Thunderbird to download updates.
|
||||
pref("app.update.BITS.enabled", false);
|
||||
#endif
|
||||
|
||||
// Release notes URL
|
||||
pref("app.releaseNotesURL", "https://live.thunderbird.net/%APP%/releasenotes?locale=%LOCALE%&version=%VERSION%&channel=%CHANNEL%&os=%OS%&buildid=%APPBUILDID%");
|
||||
|
||||
|
|
|
@ -18,11 +18,13 @@ const PREF_APP_UPDATE_ELEVATE_NEVER = "app.update.elevate.never";
|
|||
var gAppUpdater;
|
||||
|
||||
function onUnload(aEvent) {
|
||||
if (gAppUpdater.isChecking)
|
||||
gAppUpdater.checker.stopCurrentCheck();
|
||||
// Safe to call even when there isn't a download in progress.
|
||||
gAppUpdater.removeDownloadListener();
|
||||
gAppUpdater = null;
|
||||
if (gAppUpdater) {
|
||||
if (gAppUpdater.isChecking)
|
||||
gAppUpdater.checker.stopCurrentCheck();
|
||||
// Safe to call even when there isn't a download in progress.
|
||||
gAppUpdater.removeDownloadListener();
|
||||
gAppUpdater = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -294,7 +296,6 @@ appUpdater.prototype = {
|
|||
this.update.QueryInterface(Ci.nsIWritablePropertyBag);
|
||||
this.update.setProperty("foregroundDownload", "true");
|
||||
|
||||
this.aus.pauseDownload();
|
||||
let state = this.aus.downloadUpdate(this.update, false);
|
||||
if (state == "failed") {
|
||||
this.selectPanel("downloadFailed");
|
||||
|
|
|
@ -785,6 +785,9 @@ var gAdvancedPane = {
|
|||
handleEvent(aEvent) {
|
||||
if (aEvent.type == "unload") {
|
||||
this.destroy();
|
||||
if (AppConstants.MOZ_UPDATER) {
|
||||
onUnload();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче