Skip to content

perf_hooks: fix error message for invalid entryTypes - #33285

Closed
targos wants to merge 1 commit into
nodejs:masterfrom
targos:fix-entrytypes-error
Closed

perf_hooks: fix error message for invalid entryTypes#33285
targos wants to merge 1 commit into
nodejs:masterfrom
targos:fix-entrytypes-error

Conversation

@targos

Copy link
Copy Markdown
Member

Will now print a more meaningful value instead of always "[object Object]".

Will now print a more meaningful value instead of always [object Object]
@nodejs-github-botnodejs-github-bot added the perf_hooks Issues and PRs related to the implementation of the Performance Timing API. label May 7, 2020
Comment threadlib/perf_hooks.js
}
if (!ArrayIsArray(options.entryTypes)) {
throw new ERR_INVALID_OPT_VALUE('entryTypes', options);
const { entryTypes } = options;

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is to prevent accessing the value more than once (it could be a getter that doesn't always return the same thing)

@nodejs-github-bot

nodejs-github-bot commented May 7, 2020

Copy link
Copy Markdown
Collaborator

targos added a commit that referenced this pull request May 10, 2020
Will now print a more meaningful value instead of always [object Object]
PR-URL: #33285
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
@targos

Copy link
Copy Markdown
MemberAuthor

Landed in 1182539

@targostargos closed this May 10, 2020
@targos
targos deleted the fix-entrytypes-error branch May 10, 2020 11:53
codebytere pushed a commit that referenced this pull request May 11, 2020
Will now print a more meaningful value instead of always [object Object]
PR-URL: #33285
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
@codebyterecodebytere mentioned this pull request May 18, 2020
codebytere pushed a commit that referenced this pull request Jun 7, 2020
Will now print a more meaningful value instead of always [object Object]
PR-URL: #33285
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
@codebyterecodebytere mentioned this pull request Jun 9, 2020
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

perf_hooksIssues and PRs related to the implementation of the Performance Timing API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

@targos@nodejs-github-bot@jasnell@addaleax@lpinca@cjihrig@legendecas