Bug 868604 - Fix "test for equality mistyped as assignment?" warning in Android's downloads.js. r=bnicholson
authorChris Peterson <cpeterson@mozilla.com>
Fri, 03 May 2013 17:01:52 -0700
changeset 141990 75c66fa0109eb60b867adeabe3047796563c0bf2
parent 141989 0bf3505c02b2e8062c685b8804e6ac308f777208
child 141991 e64c20f04597d15322eac6516ff9f15f743a11c3
push id2579
push userakeybl@mozilla.com
push dateMon, 24 Jun 2013 18:52:47 +0000
treeherdermozilla-beta@b69b7de8a05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbnicholson
bugs868604
milestone23.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 868604 - Fix "test for equality mistyped as assignment?" warning in Android's downloads.js. r=bnicholson
mobile/android/chrome/content/downloads.js
--- a/mobile/android/chrome/content/downloads.js
+++ b/mobile/android/chrome/content/downloads.js
@@ -1,13 +1,15 @@
 // -*- Mode: js2; tab-width: 2; indent-tabs-mode: nil; js2-basic-offset: 2; js2-skip-preprocessor-directives: t; -*-
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
+"use strict";
+
 function dump(a) {
   Cc["@mozilla.org/consoleservice;1"].getService(Ci.nsIConsoleService).logStringMessage(a);
 }
 
 const URI_GENERIC_ICON_DOWNLOAD = "drawable://alert_download";
 
 var Downloads = {
   _initialized: false,
@@ -95,17 +97,17 @@ var Downloads = {
                                    aDownload.target.spec.replace("file:", "download:"));
   },
 
   // observer for last-pb-context-exited
   observe: function dl_observe(aSubject, aTopic, aData) {
     let alertsService = Cc["@mozilla.org/alerts-service;1"].getService(Ci.nsIAlertsService);
     let progressListener = alertsService.QueryInterface(Ci.nsIAlertsProgressListener);
     let download;
-    while (download = this._privateDownloads.pop()) {
+    while ((download = this._privateDownloads.pop())) {
       try {
         let notificationName = download.target.spec.replace("file:", "download:");
         progressListener.onCancel(notificationName);
       } catch (e) {
         dump("Error removing private download: " + e);
       }
     }
   },