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

src: use v8::Boolean(b) over b ? True() : False() by tniessen · Pull Request #47554 · nodejs/node · GitHub

/ node Public

src: use v8::Boolean(b) over b ? True() : False() - #47554

Merged
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
tniessen:src-boolean-ternary
Apr 16, 2023
Merged

src: use v8::Boolean(b) over b ? True() : False()#47554
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
tniessen:src-boolean-ternary

Conversation

Copy link
Copy Markdown
Member

Simplify existing code by using v8::Boolean::New() instead of equivalent expressions that contain ternary operators.

Simplify existing code by using v8::Boolean::New() instead of equivalent
expressions that contain ternary operators.
tniessen added c++ Issues and PRs that require attention from people who are familiar with C++. v8 engine Issues and PRs related to the V8 dependency. lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. labels Apr 13, 2023

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/crypto
  • @nodejs/http2
  • @nodejs/net

aduh95 added author ready PRs that have at least one approval, no outstanding review comments, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels Apr 14, 2023
github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Apr 14, 2023

Copy link
Copy Markdown
Collaborator

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

tniessen removed the v8 engine Issues and PRs related to the V8 dependency. label Apr 14, 2023

This comment was marked as outdated.

This comment was marked as outdated.

bnoordhuis left a comment

Copy link
Copy Markdown
Member

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

For background: True() and False() were at one time faster than Boolean::New() but that's no longer the case (it's literally implemented as value ? True() : False() now.)

This comment was marked as outdated.

This comment was marked as outdated.

Copy link
Copy Markdown
Collaborator

tniessen added the commit-queue Add this label to land a pull request using GitHub Actions. label Apr 16, 2023
nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Apr 16, 2023
nodejs-github-bot merged commit 4f5bb1a into nodejs:main Apr 16, 2023

Copy link
Copy Markdown
Collaborator

Landed in 4f5bb1a

targos pushed a commit that referenced this pull request May 2, 2023
Simplify existing code by using v8::Boolean::New() instead of equivalent
expressions that contain ternary operators.

PR-URL: #47554
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
targos mentioned this pull request May 2, 2023
danielleadams pushed a commit that referenced this pull request Jul 6, 2023
Simplify existing code by using v8::Boolean::New() instead of equivalent
expressions that contain ternary operators.

PR-URL: #47554
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
MoLow pushed a commit to MoLow/node that referenced this pull request Jul 6, 2023
Simplify existing code by using v8::Boolean::New() instead of equivalent
expressions that contain ternary operators.

PR-URL: nodejs#47554
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
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

author ready PRs that have at least one approval, no outstanding review comments, and a CI started. c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants


Back | FazBrowse Home | New Git URL