Followup fix to
bug 571759: make sure we don't create any globals, and iterate over the right thing. r=Standard8 over IRC.
--- a/mail/base/content/specialTabs.js
+++ b/mail/base/content/specialTabs.js
@@ -936,17 +936,17 @@ var specialTabs = {
notificationBox.appendNotification(messageString, notificationName,
iconURL,
notificationBox.PRIORITY_MEDIUM_HIGH,
buttons);
}
break;
case "addon-install-failed":
// XXX TODO This isn't terribly ideal for the multiple failure case
- for ([, install] in Iterator(installInfo.installs)) {
+ for (let [, install] in Iterator(installInfo.installs)) {
let host = (installInfo.originatingURI instanceof Ci.nsIStandardURL) &&
installInfo.originatingURI.host;
if (!host)
host = (install.sourceURI instanceof Ci.nsIStandardURL) &&
install.sourceURI.host;
let error = (host || install.error == 0) ?
"addonError" : "addonLocalError";
@@ -995,17 +995,17 @@ var specialTabs = {
label: messengerBundle.getString("addonInstallManage"),
accessKey: messengerBundle.getString("addonInstallManage.accesskey"),
popup: null,
callback: function() {
// Calculate the add-on type that is most popular in the list of
// installs.
let types = {};
let bestType = null;
- for ([, install] in Iterator(installInfo)) {
+ for (let [, install] in Iterator(installInfo.installs)) {
if (install.type in types)
types[install.type]++;
else
types[install.type] = 1;
if (!bestType || types[install.type] > types[bestType])
bestType = install.type;