summaryrefslogtreecommitdiffstats
path: root/toolkit/mozapps
diff options
context:
space:
mode:
authorMoonchild <mcwerewolf@wolfbeast.com>2019-01-06 15:07:37 +0100
committerGitHub <noreply@github.com>2019-01-06 15:07:37 +0100
commit9f4afc2552a67cc675b8b8af2ecb8ebc04a473a7 (patch)
treeeeb6c804a893bcf3ba09a3c79fa36e520f728171 /toolkit/mozapps
parent9e2bf83167f11a68a323174d4cdd995d8999f230 (diff)
parent6a97d9db02782978000cc7e081bcc6e954fa62f5 (diff)
downloadUXP-9f4afc2552a67cc675b8b8af2ecb8ebc04a473a7.tar
UXP-9f4afc2552a67cc675b8b8af2ecb8ebc04a473a7.tar.gz
UXP-9f4afc2552a67cc675b8b8af2ecb8ebc04a473a7.tar.lz
UXP-9f4afc2552a67cc675b8b8af2ecb8ebc04a473a7.tar.xz
UXP-9f4afc2552a67cc675b8b8af2ecb8ebc04a473a7.zip
Merge pull request #926 from JustOff/PR_WebExAM_addon.name
[WebExAM] Properly handle the add-on name in case it's localized
Diffstat (limited to 'toolkit/mozapps')
-rw-r--r--toolkit/mozapps/webextensions/internal/XPIProvider.jsm10
1 files changed, 7 insertions, 3 deletions
diff --git a/toolkit/mozapps/webextensions/internal/XPIProvider.jsm b/toolkit/mozapps/webextensions/internal/XPIProvider.jsm
index 256765439..c95221417 100644
--- a/toolkit/mozapps/webextensions/internal/XPIProvider.jsm
+++ b/toolkit/mozapps/webextensions/internal/XPIProvider.jsm
@@ -5663,7 +5663,7 @@ class AddonInstall {
this.updateAddonURIs();
this.addon._install = this;
- this.name = this.addon.selectedLocale.name;
+ this.name = this.addon.selectedLocale.name || this.addon.defaultLocale.name;
this.type = this.addon.type;
this.version = this.addon.version;
@@ -6690,8 +6690,9 @@ function createUpdate(aCallback, aAddon, aUpdate) {
} else {
install = new DownloadAddonInstall(aAddon._installLocation, url,
aUpdate.updateHash, aAddon, null,
- aAddon.selectedLocale.name, aAddon.type,
- aAddon.icons, aUpdate.version);
+ aAddon.selectedLocale.name ?
+ aAddon.selectedLocale.name : aAddon.defaultLocale.name,
+ aAddon.type, aAddon.icons, aUpdate.version);
}
try {
if (aUpdate.updateInfoURL)
@@ -7986,6 +7987,9 @@ PROP_LOCALE_SINGLE.forEach(function(aProp) {
if (aProp == "creator")
return result ? new AddonManagerPrivate.AddonAuthor(result) : null;
+ if (aProp == "name")
+ return result ? result : addon.defaultLocale.name;
+
return result;
});
});