Skip to content

Commit ed5e69d

Browse files
BeniChenidanbev
authored andcommitted
console: use consolePropAttributes for k-bind properties in constructor
PR-URL: #26850 Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Yongsheng Zhang <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
1 parent 6342af7 commit ed5e69d

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

lib/internal/console/constructor.js

+6-8
Original file line numberDiff line numberDiff line change
@@ -181,15 +181,13 @@ Console.prototype[kBindProperties] = function(ignoreErrors, colorMode) {
181181
...consolePropAttributes,
182182
value: Boolean(ignoreErrors)
183183
},
184-
'_times': { ...consolePropAttributes, value: new Map() }
184+
'_times': { ...consolePropAttributes, value: new Map() },
185+
// Corresponds to https://console.spec.whatwg.org/#count-map
186+
[kCounts]: { ...consolePropAttributes, value: new Map() },
187+
[kColorMode]: { ...consolePropAttributes, value: colorMode },
188+
[kIsConsole]: { ...consolePropAttributes, value: true },
189+
[kGroupIndent]: { ...consolePropAttributes, value: '' }
185190
});
186-
187-
// TODO(joyeecheung): use consolePropAttributes for these
188-
// Corresponds to https://console.spec.whatwg.org/#count-map
189-
this[kCounts] = new Map();
190-
this[kColorMode] = colorMode;
191-
this[kIsConsole] = true;
192-
this[kGroupIndent] = '';
193191
};
194192

195193
// Make a function that can serve as the callback passed to `stream.write()`.

0 commit comments

Comments
 (0)