Bug 822446: Add parens around assignment-used-as-loop-condition in nsPlacesAutoComplete.js and nsPlacesExpiration.js, to fix JS strict warning "test for equality mistyped as assignment". r=mak
authorDaniel Holbert <dholbert@cs.stanford.edu>
Mon, 17 Dec 2012 22:23:05 -0800
changeset 125488 c618b0e333a094e47efe16cf734d67a027fd0a20
parent 125487 607731c891dd593d6c7d887526ba0d1b21c82ec9
child 125489 126256fe6355fd32f4782d2bae92b302be717ce1
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)
reviewersmak
bugs822446
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 822446: Add parens around assignment-used-as-loop-condition in nsPlacesAutoComplete.js and nsPlacesExpiration.js, to fix JS strict warning "test for equality mistyped as assignment". r=mak
toolkit/components/places/nsPlacesAutoComplete.js
toolkit/components/places/nsPlacesExpiration.js
--- a/toolkit/components/places/nsPlacesAutoComplete.js
+++ b/toolkit/components/places/nsPlacesAutoComplete.js
@@ -619,17 +619,17 @@ nsPlacesAutoComplete.prototype = {
   },
 
   //////////////////////////////////////////////////////////////////////////////
   //// mozIStorageStatementCallback
 
   handleResult: function PAC_handleResult(aResultSet)
   {
     let row, haveMatches = false;
-    while (row = aResultSet.getNextRow()) {
+    while ((row = aResultSet.getNextRow())) {
       let match = this._processRow(row);
       haveMatches = haveMatches || match;
 
       if (this._result.matchCount == this._maxRichResults) {
         // We have enough results, so stop running our search.
         this._stopActiveQuery();
 
         // And finish our search.
--- a/toolkit/components/places/nsPlacesExpiration.js
+++ b/toolkit/components/places/nsPlacesExpiration.js
@@ -614,17 +614,17 @@ nsPlacesExpiration.prototype = {
 
   handleResult: function PEX_handleResult(aResultSet)
   {
     // We don't want to notify after shutdown.
     if (this._shuttingDown)
       return;
 
     let row;
-    while (row = aResultSet.getNextRow()) {
+    while ((row = aResultSet.getNextRow())) {
       if (!("_expectedResultsCount" in this))
         this._expectedResultsCount = row.getResultByName("expected_results");
       if (this._expectedResultsCount > 0)
         this._expectedResultsCount--;
 
       let uri = Services.io.newURI(row.getResultByName("url"), null, null);
       let guid = row.getResultByName("guid");
       let visitDate = row.getResultByName("visit_date");