Skip to content

Commit

Permalink
console: use consolePropAttributes for k-bind properties in constructor
Browse files Browse the repository at this point in the history
PR-URL: #26850
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
  • Loading branch information
BeniCheni authored and danbev committed Mar 27, 2019
1 parent 6342af7 commit ed5e69d
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions lib/internal/console/constructor.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,15 +181,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()`.
Expand Down

0 comments on commit ed5e69d

Please sign in to comment.