1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
| | # HG changeset patch
# User Rob Lemley <rob@thunderbird.net>
# Date 1600079976 -10800
# Node ID f085dbd311bc4b013605202de04de9a81bb55ed1
# Parent 391f1b69f6d617dd566297dd92c5f1188c6eca20
Bug 1664607 - Don't try to load what's new page when built with updater disabled. r=mkmelin a=wsmwk
When Thunderbird is built with --disable-updater, as it done by most Linux
distributions, accessing the nsIUpdateManager service will throw an error
resulting in a broken UI. Check AppConstants.MOZ_UPDATER when using
nsIUpdateManger to prevent errors.
Differential Revision: https://phabricator.services.mozilla.com/D90023
Added "comm" to the file paths (by Jonathan Brielmaier <jonathan.brielmaier@web.de>)
diff --git a/comm/mail/base/content/specialTabs.js b/comm/mail/base/content/specialTabs.js
--- a/comm/mail/base/content/specialTabs.js
+++ b/comm/mail/base/content/specialTabs.js
@@ -1043,28 +1043,30 @@ var specialTabs = {
""
);
let mstone = Services.appinfo.version;
if (mstone != old_mstone) {
Services.prefs.setCharPref("mailnews.start_page_override.mstone", mstone);
}
- let update = Cc["@mozilla.org/updates/update-manager;1"].getService(
- Ci.nsIUpdateManager
- ).activeUpdate;
+ if (AppConstants.MOZ_UPDATER) {
+ let update = Cc["@mozilla.org/updates/update-manager;1"].getService(
+ Ci.nsIUpdateManager
+ ).activeUpdate;
- if (update && Services.vc.compare(update.appVersion, old_mstone) > 0) {
- let overridePage = Services.urlFormatter.formatURLPref(
- "mailnews.start_page.override_url"
- );
- overridePage = this.getPostUpdateOverridePage(update, overridePage);
- overridePage = overridePage.replace("%OLD_VERSION%", old_mstone);
- if (overridePage) {
- openLinkExternally(overridePage);
+ if (update && Services.vc.compare(update.appVersion, old_mstone) > 0) {
+ let overridePage = Services.urlFormatter.formatURLPref(
+ "mailnews.start_page.override_url"
+ );
+ overridePage = this.getPostUpdateOverridePage(update, overridePage);
+ overridePage = overridePage.replace("%OLD_VERSION%", old_mstone);
+ if (overridePage) {
+ openLinkExternally(overridePage);
+ }
}
}
},
/**
* Gets the override page for the first run after the application has been
* updated.
* @param {nsIUpdate} update - The nsIUpdate for the update that has been applied.
|