-
-
Notifications
You must be signed in to change notification settings - Fork 31.4k
src: add FromV8Value<T>() for integral and enum types #57931
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
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:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, actually the CHECKs should be more specific..
Failed to start CI⚠ No approving reviews found ✘ Refusing to run CI on potentially unsafe PRhttps://github.com/nodejs/node/actions/runs/14540925539 |
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)
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_cast
s with the newFromV8Value<T>()