Skip to content

Commit 8e876e6

Browse files
BridgeARtargos
authored andcommitted
console: use consolePropAttributes for k-bind properties (reland)
This is a reland of #26850. It was speculatively reverted but it turned out that this did not cause any trouble. PR-URL: #27352 Refs: #26943 Refs: #26850 Reviewed-By: Daniel Bevenius <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Rich Trott <[email protected]>
1 parent 7d1c90b commit 8e876e6

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
@@ -177,15 +177,13 @@ Console.prototype[kBindProperties] = function(ignoreErrors, colorMode) {
177177
...consolePropAttributes,
178178
value: Boolean(ignoreErrors)
179179
},
180-
'_times': { ...consolePropAttributes, value: new Map() }
180+
'_times': { ...consolePropAttributes, value: new Map() },
181+
// Corresponds to https://console.spec.whatwg.org/#count-map
182+
[kCounts]: { ...consolePropAttributes, value: new Map() },
183+
[kColorMode]: { ...consolePropAttributes, value: colorMode },
184+
[kIsConsole]: { ...consolePropAttributes, value: true },
185+
[kGroupIndent]: { ...consolePropAttributes, value: '' }
181186
});
182-
183-
// TODO(joyeecheung): use consolePropAttributes for these
184-
// Corresponds to https://console.spec.whatwg.org/#count-map
185-
this[kCounts] = new Map();
186-
this[kColorMode] = colorMode;
187-
this[kIsConsole] = true;
188-
this[kGroupIndent] = '';
189187
};
190188

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

0 commit comments

Comments
 (0)