summaryrefslogtreecommitdiffstats
path: root/toolkit/mozapps
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2019-03-28 02:44:38 +0100
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-03-28 02:44:38 +0100
commit843e4ceffd6ce21a6e6db37419335eafdc543e18 (patch)
tree0f27e16d0b5444a8904e8f6c3fe4c425ebf16cf9 /toolkit/mozapps
parent0b999100f6c0b7b90d1167237621826e0e6a808a (diff)
downloadUXP-843e4ceffd6ce21a6e6db37419335eafdc543e18.tar
UXP-843e4ceffd6ce21a6e6db37419335eafdc543e18.tar.gz
UXP-843e4ceffd6ce21a6e6db37419335eafdc543e18.tar.lz
UXP-843e4ceffd6ce21a6e6db37419335eafdc543e18.tar.xz
UXP-843e4ceffd6ce21a6e6db37419335eafdc543e18.zip
Replace unsupported `null` default values with an empty string.
Fixes #1028
Diffstat (limited to 'toolkit/mozapps')
-rw-r--r--toolkit/mozapps/update/nsUpdateService.js15
1 files changed, 6 insertions, 9 deletions
diff --git a/toolkit/mozapps/update/nsUpdateService.js b/toolkit/mozapps/update/nsUpdateService.js
index 8b0167de6..d9d09ba46 100644
--- a/toolkit/mozapps/update/nsUpdateService.js
+++ b/toolkit/mozapps/update/nsUpdateService.js
@@ -2038,7 +2038,7 @@ UpdateService.prototype = {
if (getElevationRequired()) {
let installAttemptVersion = Services.prefs.getCharPref(
PREF_APP_UPDATE_ELEVATE_VERSION,
- null);
+ "");
if (vc.compare(installAttemptVersion, update.appVersion) != 0) {
Services.prefs.setCharPref(PREF_APP_UPDATE_ELEVATE_VERSION,
update.appVersion);
@@ -2708,7 +2708,7 @@ UpdateManager.prototype = {
Services.obs.notifyObservers(null, "update-staged", update.state);
// Only prompt when the UI isn't already open.
- let windowType = Services.prefs.getCharPref(PREF_APP_UPDATE_ALTWINDOWTYPE, null);
+ let windowType = Services.prefs.getCharPref(PREF_APP_UPDATE_ALTWINDOWTYPE, "");
if (Services.wm.getMostRecentWindow(UPDATE_WINDOW_NAME) ||
windowType && Services.wm.getMostRecentWindow(windowType)) {
return;
@@ -2788,15 +2788,12 @@ Checker.prototype = {
this._forced = force;
// Use the override URL if specified.
- let url = Services.prefs.getCharPref(PREF_APP_UPDATE_URL_OVERRIDE, null);
+ let url = Services.prefs.getCharPref(PREF_APP_UPDATE_URL_OVERRIDE, "");
// Otherwise, construct the update URL from component parts.
if (!url) {
- try {
- url = Services.prefs.getDefaultBranch(null).
- getCharPref(PREF_APP_UPDATE_URL);
- } catch (e) {
- }
+ url = Services.prefs.getDefaultBranch(null).
+ getCharPref(PREF_APP_UPDATE_URL, "");
}
if (!url || url == "") {
@@ -3839,7 +3836,7 @@ UpdatePrompt.prototype = {
* application update user interface window.
*/
_getAltUpdateWindow: function UP__getAltUpdateWindow() {
- let windowType = Services.prefs.getCharPref(PREF_APP_UPDATE_ALTWINDOWTYPE, null);
+ let windowType = Services.prefs.getCharPref(PREF_APP_UPDATE_ALTWINDOWTYPE, "");
if (!windowType)
return null;
return Services.wm.getMostRecentWindow(windowType);