console: allow Object.prototype fields as labels
authorcjihrig <cjihrig@gmail.com>
Fri, 23 Jan 2015 01:16:36 +0000 (20:16 -0500)
committercjihrig <cjihrig@gmail.com>
Tue, 27 Jan 2015 23:28:09 +0000 (18:28 -0500)
commit3cbb5cdfdb621baec5dc3a2ac505be37f1718086
treede1375696726598a20a365d54628a72aec397664
parent87e62bd4c87e8674e3d1c432506e9b4991784ee2
console: allow Object.prototype fields as labels

Console.prototype.timeEnd() returns NaN if the timer label
corresponds to a property on Object.prototype. This commit
uses a Map to construct the _times object.

Fixes: https://github.com/joyent/node/issues/9069
PR-URL: https://github.com/iojs/io.js/pull/563
Reviewed-By: Vladimir Kurchatkin <vladimir.kurchatkin@gmail.com>
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
lib/console.js
test/parallel/test-console.js