forked from nodejs/node-v0.x-archive
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
console: allow Object.prototype fields as labels
This is a backport of 6c3647c from v0.12 to v0.10. Console.prototype.timeEnd() returns NaN if the timer label corresponds to a property on Object.prototype. In v0.12, this was fixed by using Object.create(null) to construct the _times object However, the version of V8 in the v0.10 branch makes this fix not work as expected. In v0.10, this commit changes the _times object into a array of objects of the form: { label: someLabel, time: staringWallClockTime } someLabel can thus be any string, including any string that represents any Object.prototype field. Fixes nodejs#9116. PR: nodejs#9215 PR-URL: nodejs#9215 Reviewed-By: Colin Ihrig <[email protected]>
- Loading branch information
Julien Gilli
committed
Feb 18, 2015
1 parent
ad06848
commit c8239c0
Showing
2 changed files
with
55 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters