-
Notifications
You must be signed in to change notification settings - Fork 30k
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
src: use better return types in KVStore #54539
Conversation
- Use `v8::Maybe<void>` instead of `v8::Maybe<bool>` and handle error from `AssignFromObject`. - An empty `v8::Maybe` is supposed to be returned when an exception is pending. Use `std::optional` instead to indicate a missing value in `Get(key)`.
Note that I didn't change |
/cc @nodejs/cpp-reviewers |
This comment was marked as resolved.
This comment was marked as resolved.
The mistake was obvious. |
This comment was marked as outdated.
This comment was marked as outdated.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #54539 +/- ##
=======================================
Coverage 87.32% 87.33%
=======================================
Files 649 649
Lines 182603 182607 +4
Branches 35042 35042
=======================================
+ Hits 159464 159471 +7
+ Misses 16400 16397 -3
Partials 6739 6739
|
Commit Queue failed- Loading data for nodejs/node/pull/54539 ✔ Done loading data for nodejs/node/pull/54539 ----------------------------------- PR info ------------------------------------ Title src: use better return types in KVStore (#54539) Author Michaël Zasso <[email protected]> (@targos) Branch targos:kv-optional -> nodejs:main Labels c++, lib / src, needs-ci, commit-queue-squash Commits 2 - src: use better return types in KVStore - fixup Committers 1 - Michaël Zasso <[email protected]> PR-URL: https://github.com/nodejs/node/pull/54539 Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]> Reviewed-By: Mohammed Keyvanzadeh <[email protected]> ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/54539 Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]> Reviewed-By: Mohammed Keyvanzadeh <[email protected]> -------------------------------------------------------------------------------- ℹ This PR was created on Sat, 24 Aug 2024 13:14:22 GMT ✔ Approvals: 5 ✔ - Tobias Nießen (@tniessen) (TSC): https://github.com/nodejs/node/pull/54539#pullrequestreview-2258733830 ✔ - Anna Henningsen (@addaleax): https://github.com/nodejs/node/pull/54539#pullrequestreview-2258750609 ✔ - James M Snell (@jasnell) (TSC): https://github.com/nodejs/node/pull/54539#pullrequestreview-2258973417 ✔ - Rafael Gonzaga (@RafaelGSS) (TSC): https://github.com/nodejs/node/pull/54539#pullrequestreview-2258999489 ✔ - Mohammed Keyvanzadeh (@VoltrexKeyva): https://github.com/nodejs/node/pull/54539#pullrequestreview-2259303546 ✘ Last GitHub CI failed ℹ Last Full PR CI on 2024-08-24T21:03:59Z: https://ci.nodejs.org/job/node-test-pull-request/61426/ - Querying data for job/node-test-pull-request/61426/ ✔ Last Jenkins CI successful -------------------------------------------------------------------------------- ✔ Aborted `git node land` session in /home/runner/work/node/node/.ncuhttps://github.com/nodejs/node/actions/runs/10560540424 |
- Use `v8::Maybe<void>` instead of `v8::Maybe<bool>` and handle error from `AssignFromObject`. - An empty `v8::Maybe` is supposed to be returned when an exception is pending. Use `std::optional` instead to indicate a missing value in `Get(key)`. PR-URL: #54539 Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]> Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
Landed in 8f1fa03 |
- Use `v8::Maybe<void>` instead of `v8::Maybe<bool>` and handle error from `AssignFromObject`. - An empty `v8::Maybe` is supposed to be returned when an exception is pending. Use `std::optional` instead to indicate a missing value in `Get(key)`. PR-URL: #54539 Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]> Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
- Use `v8::Maybe<void>` instead of `v8::Maybe<bool>` and handle error from `AssignFromObject`. - An empty `v8::Maybe` is supposed to be returned when an exception is pending. Use `std::optional` instead to indicate a missing value in `Get(key)`. PR-URL: #54539 Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]> Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
- Use `v8::Maybe<void>` instead of `v8::Maybe<bool>` and handle error from `AssignFromObject`. - An empty `v8::Maybe` is supposed to be returned when an exception is pending. Use `std::optional` instead to indicate a missing value in `Get(key)`. PR-URL: nodejs#54539 Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]> Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
v8::Maybe<void>
instead ofv8::Maybe<bool>
and handle errorfrom
AssignFromObject
.v8::Maybe
is supposed to be returned when an exception ispending. Use
std::optional
instead to indicate a missing value inGet(key)
.