Followup fix to bug 571759: make sure we don't create any globals, and iterate over the right thing. r=Standard8 over IRC.
authorSiddharth Agarwal <sid.bugzilla@gmail.com>
Sat, 22 Jan 2011 02:52:53 +0530
changeset 6991 88032a4ef8386b9b5df07832307144918d8b4796
parent 6990 df7550b1d71ac40be42f56823b2e93669560aaf1
child 6992 3a40bd22fd66ea2256b2e54eacb2ada44cad0e1d
push idunknown
push userunknown
push dateunknown
reviewersStandard8
bugs571759
Followup fix to bug 571759: make sure we don't create any globals, and iterate over the right thing. r=Standard8 over IRC.
mail/base/content/specialTabs.js
--- 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;