Skip to content
This repository was archived by the owner on Apr 19, 2021. It is now read-only.

Commit 269ac85

Browse files
smw-koopsHainish
authored andcommitted
Replace non-standard for each statement with for (EFForg#7685)
* Replace non-standard for each statement with for
1 parent 2a23009 commit 269ac85

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/chrome/content/code/Cookie.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ Cookie.prototype = {
7272
this.value = nv.join('=') || '';
7373

7474
var n, v;
75-
for each (p in parts) {
75+
for (p of parts) {
7676
nv = p.split("=");
7777
switch (n = nv[0].toLowerCase()) {
7878
case 'expires':

src/chrome/content/code/HTTPS.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ const HTTPS = {
141141
}
142142
if (!cookies) return;
143143
var c;
144-
for each (var cs in cookies.split("\n")) {
144+
for (var cs of cookies.split("\n")) {
145145
this.log(DBUG, "Examining cookie: ");
146146
c = new Cookie(cs, host);
147147
if (!c.secure && HTTPSRules.shouldSecureCookie(alist, c, true)) {
@@ -229,7 +229,7 @@ const HTTPS = {
229229

230230
var cs = CC['@mozilla.org/cookieService;1'].getService(CI.nsICookieService).getCookieString(uri, req);
231231

232-
for each (c in dcookies) {
232+
for (c of dcookies) {
233233
c.secure = dsecure;
234234
c.save();
235235
this.log(WARN,"Toggled secure flag on " + c);

src/chrome/content/code/IOUtil.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ const IOUtil = {
127127
},
128128

129129
findWindow: function(channel) {
130-
for each(var cb in [channel.notificationCallbacks,
130+
for (var cb of [channel.notificationCallbacks,
131131
channel.loadGroup && channel.loadGroup.notificationCallbacks]) {
132132
if (cb instanceof Ci.nsIInterfaceRequestor) {
133133
if (Ci.nsILoadContext) try {

0 commit comments

Comments
 (0)