Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: utils/jstypes.js

Issue 29350140: Issue 4353 - Remove non standard for each syntax (Closed)
Patch Set: Created Aug. 24, 2016, 11:08 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« scripts/decompile.js ('K') | « utils/dumpast.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/jstypes.js
diff --git a/utils/jstypes.js b/utils/jstypes.js
index 7b0716c24bf460a4ddada911c2ce454fdf108825..f5aa4c84e9e373a87f8d8b9d6da43078837169b6 100644
--- a/utils/jstypes.js
+++ b/utils/jstypes.js
@@ -4,7 +4,7 @@
function divine_inheritance(clazz, constants) {
let aliases = {};
- for each (let c in constants) {
+ for (let c of constants) {
aliases[c.name] = c.init;
}
@@ -17,19 +17,19 @@ function divine_inheritance(clazz, constants) {
if (!clazz.inherits)
clazz.inherits = [];
- for each (let iface in xpcom.kids[1].kids)
+ for (let iface of xpcom.kids[1].kids)
clazz.inherits.push(iface.atom);
return;
}
-
+
if ("QueryInterface" in clazz.functions) {
if (!clazz.inherits)
clazz.inherits = [];
function findInterfaces(ast) {
- if (ast.op == JSOP_GETPROP && ast.kids[0]) {
- let check = ast.kids[0];
- if (check.atom == "interfaces" && check.kids[0] &&
- check.kids[0].atom == "Components") {
+ if (ast.op == JSOP_GETPROP && ast.kids[0]) {
+ let check = ast.kids[0];
+ if (check.atom == "interfaces" && check.kids[0] &&
+ check.kids[0].atom == "Components") {
clazz.inherits.push(ast.atom);
}
}
« scripts/decompile.js ('K') | « utils/dumpast.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld