Bug 1216623 - Part 1: Rename some loop variables to avoid conflicts with ES6 scoping rules. r=fitzgen, r=ttaubert, r=MattN, r=gps.

--HG--
extra : commitid : 3eLC5U91GM8
extra : rebase_source : 0933f07c19c0ba87fc34ddd9beaff4bb89e7c690
extra : amend_source : 76fa887d541bfd9f6592b6a6113d76b4df82dea0
This commit is contained in:
Jason Orendorff 2015-10-26 16:33:59 -05:00
parent 50a3cf956c
commit 1a625d9f04
5 changed files with 12 additions and 11 deletions

View File

@ -2934,8 +2934,8 @@ var SessionStoreInternal = {
// In case we didn't collect/receive data for any tabs yet we'll have to
// fill the array with at least empty tabData objects until |_tPos| or
// we'll end up with |null| entries.
for (let tab of Array.slice(tabbrowser.tabs, 0, tab._tPos)) {
let emptyState = {entries: [], lastAccessed: tab.lastAccessed};
for (let otherTab of Array.slice(tabbrowser.tabs, 0, tab._tPos)) {
let emptyState = {entries: [], lastAccessed: otherTab.lastAccessed};
this._windows[window.__SSi].tabs.push(emptyState);
}

View File

@ -2162,8 +2162,8 @@ if (AppConstants.MOZ_SERVICES_HEALTHREPORT) {
_serializeJSONDaily: function(data) {
let result = {_v: this.version };
for (let [field, data] of data) {
result[field] = data;
for (let [field, value] of data) {
result[field] = value;
}
return result;

View File

@ -265,7 +265,8 @@ self.random = {
{
let h, n = 0xefc8249d;
for (let i = 0, data = data.toString(), len = data.length; i < len; i++) {
data = data.toString();
for (let i = 0, len = data.length; i < len; i++) {
n += data.charCodeAt(i);
h = 0.02519603282416938 * n;
n = h >>> 0;

View File

@ -126,8 +126,8 @@ function recursiveWalk(breakdown, edge, report, visitor) {
visitor.exit(breakdown, report, edge);
} else {
visitor.enter(breakdown, report, edge);
for (let { edge, referent, breakdown } of getReportEdges(breakdown, report)) {
recursiveWalk(breakdown, edge, referent, visitor);
for (let { edge, referent, breakdown: subBreakdown } of getReportEdges(breakdown, report)) {
recursiveWalk(subBreakdown, edge, referent, visitor);
}
visitor.exit(breakdown, report, edge);
}

View File

@ -370,7 +370,7 @@ Measurement.prototype = Object.freeze({
_serializeJSONSingular: function (data) {
let result = {"_v": this.version};
for (let [field, data] of data) {
for (let [field, value] of data) {
// There could be legacy fields in storage we no longer care about.
if (!this.shouldIncludeField(field)) {
continue;
@ -381,7 +381,7 @@ Measurement.prototype = Object.freeze({
switch (type) {
case this.storage.FIELD_LAST_NUMERIC:
case this.storage.FIELD_LAST_TEXT:
result[field] = data[1];
result[field] = value[1];
break;
case this.storage.FIELD_DAILY_COUNTER:
@ -402,7 +402,7 @@ Measurement.prototype = Object.freeze({
_serializeJSONDay: function (data) {
let result = {"_v": this.version};
for (let [field, data] of data) {
for (let [field, value] of data) {
if (!this.shouldIncludeField(field)) {
continue;
}
@ -415,7 +415,7 @@ Measurement.prototype = Object.freeze({
case this.storage.FIELD_DAILY_DISCRETE_TEXT:
case this.storage.FIELD_DAILY_LAST_NUMERIC:
case this.storage.FIELD_DAILY_LAST_TEXT:
result[field] = data;
result[field] = value;
break;
case this.storage.FIELD_LAST_NUMERIC: