From c8788ee82a60cae4dc312c0ecb141779c97204de Mon Sep 17 00:00:00 2001 From: Ruben Bridgewater Date: Tue, 23 Apr 2019 02:04:31 +0200 Subject: [PATCH] Revert "Revert "console: use consolePropAttributes for k-bind properties in constructor"" This reverts commit a8eac78f8dbe778a2aef69d0989416e47c6c403e. --- lib/internal/console/constructor.js | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/lib/internal/console/constructor.js b/lib/internal/console/constructor.js index f1f3c725eca25a..04b6087b77f780 100644 --- a/lib/internal/console/constructor.js +++ b/lib/internal/console/constructor.js @@ -177,15 +177,13 @@ Console.prototype[kBindProperties] = function(ignoreErrors, colorMode) { ...consolePropAttributes, value: Boolean(ignoreErrors) }, - '_times': { ...consolePropAttributes, value: new Map() } + '_times': { ...consolePropAttributes, value: new Map() }, + // Corresponds to https://console.spec.whatwg.org/#count-map + [kCounts]: { ...consolePropAttributes, value: new Map() }, + [kColorMode]: { ...consolePropAttributes, value: colorMode }, + [kIsConsole]: { ...consolePropAttributes, value: true }, + [kGroupIndent]: { ...consolePropAttributes, value: '' } }); - - // TODO(joyeecheung): use consolePropAttributes for these - // Corresponds to https://console.spec.whatwg.org/#count-map - this[kCounts] = new Map(); - this[kColorMode] = colorMode; - this[kIsConsole] = true; - this[kGroupIndent] = ''; }; // Make a function that can serve as the callback passed to `stream.write()`.