src: add FromV8Value<T>() for integral and enum types#57931
Merged
nodejs-github-bot merged 1 commit intonodejs:mainfrom Jun 24, 2025
Merged
src: add FromV8Value<T>() for integral and enum types#57931nodejs-github-bot merged 1 commit intonodejs:mainfrom
nodejs-github-bot merged 1 commit intonodejs:mainfrom
Conversation
Collaborator
|
Review requested:
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #57931 +/- ##
==========================================
- Coverage 90.28% 90.27% -0.01%
==========================================
Files 630 630
Lines 186158 186160 +2
Branches 36484 36476 -8
==========================================
- Hits 168067 168057 -10
+ Misses 10974 10970 -4
- Partials 7117 7133 +16
🚀 New features to boost your workflow:
|
joyeecheung
previously approved these changes
Apr 18, 2025
joyeecheung
reviewed
Apr 18, 2025
Member
joyeecheung
left a comment
There was a problem hiding this comment.
hmm, actually the CHECKs should be more specific..
Contributor
Failed to start CI⚠ No approving reviews found ✘ Refusing to run CI on potentially unsafe PRhttps://github.com/nodejs/node/actions/runs/14540925539 |
jasnell
approved these changes
Apr 20, 2025
joyeecheung
approved these changes
Apr 23, 2025
Member
|
This now has a conflict with the main branch, can you rebase? |
Add a template utility method FromV8Value<T>() to replace the repetitive static_cast<...>(value.As<>()‑>Value()) pattern. It also additionally adds compile‑time range checks for integers. Refs: nodejs#57146 (comment)
joyeecheung
approved these changes
May 2, 2025
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
|
It worked thank you
…On Sun, 4 May 2025 at 1:56 am, Node.js GitHub Bot ***@***.***> wrote:
*nodejs-github-bot* left a comment (nodejs/node#57931)
<#57931 (comment)>
CI: https://ci.nodejs.org/job/node-test-pull-request/66564/
—
Reply to this email directly, view it on GitHub
<#57931 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/BQIUYLZAFWID422ZKHTNSYD24TRJFAVCNFSM6AAAAAB3NQ36XWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDQNBYGY4DINRUHE>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Collaborator
Collaborator
Collaborator
|
Landed in faada65 |
RafaelGSS
pushed a commit
that referenced
this pull request
Jun 24, 2025
Add a template utility method FromV8Value<T>() to replace the repetitive static_cast<...>(value.As<>()‑>Value()) pattern. It also additionally adds compile‑time range checks for integers. Refs: #57146 (comment) PR-URL: #57931 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
aduh95
pushed a commit
that referenced
this pull request
Jul 21, 2025
Add a template utility method FromV8Value<T>() to replace the repetitive static_cast<...>(value.As<>()‑>Value()) pattern. It also additionally adds compile‑time range checks for integers. Refs: #57146 (comment) PR-URL: #57931 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
aduh95
pushed a commit
that referenced
this pull request
Jul 24, 2025
Add a template utility method FromV8Value<T>() to replace the repetitive static_cast<...>(value.As<>()‑>Value()) pattern. It also additionally adds compile‑time range checks for integers. Refs: #57146 (comment) PR-URL: #57931 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
From the following comment in the pull request: #57146 (comment)
Add a template utility method
FromV8Value<T>()to replace the repetitivestatic_cast<...>(value.As<>()‑>Value())pattern. It also additionally adds compile‑time range checks for integers.I've also replaced a bunch of
static_casts with the newFromV8Value<T>()