Bug 1116769 - Use for each ... in instead of for ... of in webapprt downloads.js. r=myk

This commit is contained in:
Marco Castelluccio 2015-01-05 22:40:24 -08:00
parent 69e6dd8415
commit fcdd779f22

View File

@ -727,7 +727,7 @@ let gDownloadList = {
this.downloadView.parentNode.replaceChild(empty, this.downloadView);
this.downloadView = empty;
for (let downloadItem of this.downloadItems) {
for each (let downloadItem in this.downloadItems) {
if (downloadItem.inProgress ||
downloadItem.matchesSearch(this.searchTerms, this.searchAttributes)) {
this.downloadView.appendChild(downloadItem.element);
@ -773,7 +773,7 @@ let gDownloadList = {
let button = document.getElementById("clearListButton");
// The button is enabled if we have items in the list that we can clean up.
for (let downloadItem of this.downloadItems) {
for each (let downloadItem in this.downloadItems) {
if (!downloadItem.inProgress &&
downloadItem.matchesSearch(this.searchTerms, this.searchAttributes)) {
button.disabled = false;
@ -983,7 +983,7 @@ let gDownloadList = {
let totalSize = 0;
let totalTransferred = 0;
for (let downloadItem of this.downloadItems) {
for each (let downloadItem in this.downloadItems) {
if (!downloadItem.inProgress) {
continue;
}