diff options
Diffstat (limited to 'ext/console/02_console.js')
-rw-r--r-- | ext/console/02_console.js | 38 |
1 files changed, 21 insertions, 17 deletions
diff --git a/ext/console/02_console.js b/ext/console/02_console.js index 2e54cd137..e5fe3416a 100644 --- a/ext/console/02_console.js +++ b/ext/console/02_console.js @@ -277,7 +277,8 @@ }` + `${tableChars.rightMiddle}\n`; - for (const row of new SafeArrayIterator(rows)) { + for (let i = 0; i < rows.length; ++i) { + const row = rows[i]; result += `${renderRow(row, columnWidths, columnRightAlign)}\n`; } @@ -995,7 +996,8 @@ } const refMap = new Map(); - for (const cause of new SafeArrayIterator(causes)) { + for (let i = 0; i < causes.length; ++i) { + const cause = causes[i]; if (circular !== undefined) { const index = MapPrototypeGet(circular, cause); if (index !== undefined) { @@ -1172,7 +1174,8 @@ inspectOptions.indentLevel++; - for (const key of new SafeArrayIterator(stringKeys)) { + for (let i = 0; i < stringKeys.length; ++i) { + const key = stringKeys[i]; if (inspectOptions.getters) { let propertyValue; let error = null; @@ -1208,7 +1211,8 @@ } } - for (const key of new SafeArrayIterator(symbolKeys)) { + for (let i = 0; i < symbolKeys.length; ++i) { + const key = symbolKeys[i]; if ( !inspectOptions.showHidden && !propertyIsEnumerable(value, key) @@ -1640,7 +1644,8 @@ currentPart = ""; } - for (const [key, value] of new SafeArrayIterator(rawEntries)) { + for (let i = 0; i < rawEntries.length; ++i) { + const [key, value] = rawEntries[i]; if (key == "background-color") { if (value != null) { css.backgroundColor = value; @@ -1661,11 +1666,9 @@ } } else if (key == "text-decoration-line") { css.textDecorationLine = []; - for ( - const lineType of new SafeArrayIterator( - StringPrototypeSplit(value, /\s+/g), - ) - ) { + const lineTypes = StringPrototypeSplit(value, /\s+/g); + for (let i = 0; i < lineTypes.length; ++i) { + const lineType = lineTypes[i]; if ( ArrayPrototypeIncludes( ["line-through", "overline", "underline"], @@ -1683,11 +1686,9 @@ } else if (key == "text-decoration") { css.textDecorationColor = null; css.textDecorationLine = []; - for ( - const arg of new SafeArrayIterator( - StringPrototypeSplit(value, /\s+/g), - ) - ) { + const args = StringPrototypeSplit(value, /\s+/g); + for (let i = 0; i < args.length; ++i) { + const arg = args[i]; const maybeColor = parseCssColor(arg); if (maybeColor != null) { css.textDecorationColor = maybeColor; @@ -2144,7 +2145,8 @@ } else { const valueObj = value || {}; const keys = properties || ObjectKeys(valueObj); - for (const k of new SafeArrayIterator(keys)) { + for (let i = 0; i < keys.length; ++i) { + const k = keys[i]; if (!primitive && ReflectHas(valueObj, k)) { if (!(ReflectHas(objectValues, k))) { objectValues[k] = ArrayPrototypeFill(new Array(numRows), ""); @@ -2339,7 +2341,9 @@ function wrapConsole(consoleFromDeno, consoleFromV8) { const callConsole = core.callConsole; - for (const key of new SafeArrayIterator(ObjectKeys(consoleFromV8))) { + const keys = ObjectKeys(consoleFromV8); + for (let i = 0; i < keys.length; ++i) { + const key = keys[i]; if (ObjectPrototypeHasOwnProperty(consoleFromDeno, key)) { consoleFromDeno[key] = FunctionPrototypeBind( callConsole, |