FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

perf_hooks: fix for redundant validation check for number by pluris · Pull Request #49547 · nodejs/node · GitHub

/ node Public

perf_hooks: fix for redundant validation check for number - #49547

Closed
pluris wants to merge 1 commit into
nodejs:mainfrom
pluris:fix/histogram_validate_number
Closed

perf_hooks: fix for redundant validation check for number#49547
pluris wants to merge 1 commit into
nodejs:mainfrom
pluris:fix/histogram_validate_number

Conversation

pluris commented Sep 8, 2023

Copy link
Copy Markdown
Contributor

It has been modified so that Type and range can be checked only with validateNumber.
Below is a modified reference to a similar case.

Refs: #45770

nodejs-github-bot added the needs-ci PRs that need a full CI run. label Sep 8, 2023
Comment thread lib/internal/histogram.js
validateNumber(percentile, 'percentile');
if (NumberIsNaN(percentile) || percentile <= 0 || percentile > 100)
throw new ERR_OUT_OF_RANGE('percentile', '> 0 && <= 100', percentile);
validateNumber(percentile, 'percentile', 1, 100);

deokjinkim Sep 8, 2023
edited
Loading

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I tried this approach before, but all the numbers between 0 and 1 are not allowed any more with this PR.
This(#45772 (comment)) is previous discussion.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

@deokjinkim Thank you for explaining the history. I'll close it.

pluris closed this Sep 8, 2023
pluris deleted the fix/histogram_validate_number branch November 8, 2023 02:24
This file contains hidden or 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL