Bug 822430: Add parens around assignment-used-as-loop-condition in AddonRepository.jsm, to fix JS strict warning "test for equality mistyped as assignment". r=Mossop
authorDaniel Holbert <dholbert@cs.stanford.edu>
Thu, 20 Dec 2012 14:02:20 -0800
changeset 125823 f578e6d37c130d71a1aefa467f8c05b943ba4804
parent 125822 f29149459b0f6f4f120055a25ca36f904989d516
child 125824 93e12399bae42c6a3aa28637e2fe438755feb89a
push id2151
push userlsblakk@mozilla.com
push dateTue, 19 Feb 2013 18:06:57 +0000
treeherdermozilla-beta@4952e88741ec [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersMossop
bugs822430
milestone20.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 822430: Add parens around assignment-used-as-loop-condition in AddonRepository.jsm, to fix JS strict warning "test for equality mistyped as assignment". r=Mossop
toolkit/mozapps/extensions/AddonRepository.jsm
--- a/toolkit/mozapps/extensions/AddonRepository.jsm
+++ b/toolkit/mozapps/extensions/AddonRepository.jsm
@@ -1743,17 +1743,17 @@ var AddonDatabase = {
     let self = this;
     let addons = {};
 
     // Retrieve all data from the addon table
     function getAllAddons() {
       self.getAsyncStatement("getAllAddons").executeAsync({
         handleResult: function getAllAddons_handleResult(aResults) {
           let row = null;
-          while (row = aResults.getNextRow()) {
+          while ((row = aResults.getNextRow())) {
             let internal_id = row.getResultByName("internal_id");
             addons[internal_id] = self._makeAddonFromAsyncRow(row);
           }
         },
 
         handleError: self.asyncErrorLogger,
 
         handleCompletion: function getAllAddons_handleCompletion(aReason) {
@@ -1768,17 +1768,17 @@ var AddonDatabase = {
       });
     }
 
     // Retrieve all data from the developer table
     function getAllDevelopers() {
       self.getAsyncStatement("getAllDevelopers").executeAsync({
         handleResult: function getAllDevelopers_handleResult(aResults) {
           let row = null;
-          while (row = aResults.getNextRow()) {
+          while ((row = aResults.getNextRow())) {
             let addon_internal_id = row.getResultByName("addon_internal_id");
             if (!(addon_internal_id in addons)) {
               WARN("Found a developer not linked to an add-on in database");
               continue;
             }
 
             let addon = addons[addon_internal_id];
             if (!addon.developers)
@@ -1802,17 +1802,17 @@ var AddonDatabase = {
       });
     }
 
     // Retrieve all data from the screenshot table
     function getAllScreenshots() {
       self.getAsyncStatement("getAllScreenshots").executeAsync({
         handleResult: function getAllScreenshots_handleResult(aResults) {
           let row = null;
-          while (row = aResults.getNextRow()) {
+          while ((row = aResults.getNextRow())) {
             let addon_internal_id = row.getResultByName("addon_internal_id");
             if (!(addon_internal_id in addons)) {
               WARN("Found a screenshot not linked to an add-on in database");
               continue;
             }
 
             let addon = addons[addon_internal_id];
             if (!addon.screenshots)
@@ -1834,17 +1834,17 @@ var AddonDatabase = {
         }
       });
     }
 
     function getAllCompatOverrides() {
       self.getAsyncStatement("getAllCompatOverrides").executeAsync({
         handleResult: function getAllCompatOverrides_handleResult(aResults) {
           let row = null;
-          while (row = aResults.getNextRow()) {
+          while ((row = aResults.getNextRow())) {
             let addon_internal_id = row.getResultByName("addon_internal_id");
             if (!(addon_internal_id in addons)) {
               WARN("Found a compatibility override not linked to an add-on in database");
               continue;
             }
 
             let addon = addons[addon_internal_id];
             if (!addon.compatibilityOverrides)
@@ -1866,17 +1866,17 @@ var AddonDatabase = {
         }
       });
     }
 
     function getAllIcons() {
       self.getAsyncStatement("getAllIcons").executeAsync({
         handleResult: function getAllIcons_handleResult(aResults) {
           let row = null;
-          while (row = aResults.getNextRow()) {
+          while ((row = aResults.getNextRow())) {
             let addon_internal_id = row.getResultByName("addon_internal_id");
             if (!(addon_internal_id in addons)) {
               WARN("Found an icon not linked to an add-on in database");
               continue;
             }
 
             let addon = addons[addon_internal_id];
             let { size, url } = self._makeIconFromAsyncRow(row);