summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBeni von Cheni <benjaminlchen@gmail.com>2019-03-22 00:22:42 -0400
committerDaniel Bevenius <daniel.bevenius@gmail.com>2019-03-27 05:59:43 +0100
commited5e69d7e6eaf5e887ff48aa3fe941d394c44846 (patch)
treeeb849fc392f95f5dfb260a082ddbd0706fbff9d6 /lib
parent6342af7ebdd6cd516507fba5a91ffc6878ef7cfb (diff)
downloadandroid-node-v8-ed5e69d7e6eaf5e887ff48aa3fe941d394c44846.tar.gz
android-node-v8-ed5e69d7e6eaf5e887ff48aa3fe941d394c44846.tar.bz2
android-node-v8-ed5e69d7e6eaf5e887ff48aa3fe941d394c44846.zip
console: use consolePropAttributes for k-bind properties in constructor
PR-URL: https://github.com/nodejs/node/pull/26850 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Diffstat (limited to 'lib')
-rw-r--r--lib/internal/console/constructor.js14
1 files changed, 6 insertions, 8 deletions
diff --git a/lib/internal/console/constructor.js b/lib/internal/console/constructor.js
index b00707d1fd..fadb80e707 100644
--- a/lib/internal/console/constructor.js
+++ b/lib/internal/console/constructor.js
@@ -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()`.