-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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: add receiver to fast api callback methods #54408
Conversation
When creating an fast api the callback might use the receiver. In that case if the internal binding is destructured the method won't have access to the reciver and it will throw. Passing the receiver as second argument ensures the receiver is available.
Review requested:
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #54408 +/- ##
==========================================
+ Coverage 87.08% 88.23% +1.15%
==========================================
Files 648 651 +3
Lines 182341 183881 +1540
Branches 34982 35863 +881
==========================================
+ Hits 158783 162252 +3469
+ Misses 16831 14920 -1911
+ Partials 6727 6709 -18
|
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.
LGTM with doc nits
Co-authored-by: Joyee Cheung <[email protected]>
Co-authored-by: Aviv Keller <[email protected]>
The failing tests seem to be in the flaky list except |
This comment was marked as off-topic.
This comment was marked as off-topic.
Commit Queue failed- Loading data for nodejs/node/pull/54408 ✔ Done loading data for nodejs/node/pull/54408 ----------------------------------- PR info ------------------------------------ Title src: add receiver to fast api callback methods (#54408) ⚠ Could not retrieve the email or name of the PR author's from user's GitHub profile! Branch Ceres6:feat/fast-api-recv -> nodejs:main Labels lib / src, author ready, needs-ci Commits 4 - src: add receiver to fast api callback methods - fixup! src: add receiver to fast api callback methods - Apply suggestions from code review - Update doc/contributing/adding-v8-fast-api.md Committers 2 - Carlos Espa <[email protected]> - GitHub <[email protected]> PR-URL: https://github.com/nodejs/node/pull/54408 Reviewed-By: Stephen Belanger <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Santiago Gimeno <[email protected]> ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/54408 Reviewed-By: Stephen Belanger <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Santiago Gimeno <[email protected]> -------------------------------------------------------------------------------- ℹ This PR was created on Fri, 16 Aug 2024 11:17:33 GMT ✔ Approvals: 4 ✔ - Stephen Belanger (@Qard): https://github.com/nodejs/node/pull/54408#pullrequestreview-2325953561 ✔ - Joyee Cheung (@joyeecheung) (TSC): https://github.com/nodejs/node/pull/54408#pullrequestreview-2325962058 ✔ - Yagiz Nizipli (@anonrig) (TSC): https://github.com/nodejs/node/pull/54408#pullrequestreview-2326113357 ✔ - Santiago Gimeno (@santigimeno): https://github.com/nodejs/node/pull/54408#pullrequestreview-2326262397 ✔ Last GitHub CI successful ℹ Last Full PR CI on 2024-09-27T14:00:42Z: https://ci.nodejs.org/job/node-test-pull-request/62801/ - Querying data for job/node-test-pull-request/62801/ ✔ Last Jenkins CI successful -------------------------------------------------------------------------------- ✔ No git cherry-pick in progress ✔ No git am in progress ✔ No git rebase in progress -------------------------------------------------------------------------------- - Bringing origin/main up to date... From https://github.com/nodejs/node * branch main -> FETCH_HEAD ✔ origin/main is now up-to-date - Downloading patch for 54408 From https://github.com/nodejs/node * branch refs/pull/54408/merge -> FETCH_HEAD ✔ Fetched commits as 1398c04c47a3..41522d482aff -------------------------------------------------------------------------------- Auto-merging doc/api/cli.md Auto-merging doc/api/permissions.md Auto-merging doc/contributing/adding-v8-fast-api.md Auto-merging lib/fs.js Auto-merging lib/internal/fs/promises.js Auto-merging lib/internal/modules/cjs/loader.js Auto-merging lib/internal/modules/esm/resolve.js Auto-merging src/node_external_reference.h Auto-merging src/node_file.cc [main c67d9876b8] src: add receiver to fast api callback methods Author: Carlos Espa <[email protected]> Date: Fri Aug 16 13:12:04 2024 +0200 11 files changed, 33 insertions(+), 14 deletions(-) Auto-merging src/histogram.cc Auto-merging src/node_external_reference.h Auto-merging src/node_wasi.cc [main 465f1dd77f] fixup! src: add receiver to fast api callback methods Author: Carlos Espa <[email protected]> Date: Tue Sep 24 11:33:53 2024 +0200 8 files changed, 86 insertions(+), 39 deletions(-) Auto-merging doc/contributing/adding-v8-fast-api.md [main 30e3a66a60] Apply suggestions from code review Author: Carlos Espa <[email protected]> Date: Tue Sep 24 11:38:03 2024 +0200 1 file changed, 5 insertions(+), 1 deletion(-) Auto-merging doc/contributing/adding-v8-fast-api.md [main 92dad662f3] Update doc/contributing/adding-v8-fast-api.md Author: Carlos Espa <[email protected]> Date: Tue Sep 24 21:31:31 2024 +0200 1 file changed, 1 insertion(+), 1 deletion(-) ✔ Patches applied There are 4 commits in the PR. Attempting autorebase. Rebasing (2/7) Rebasing (3/7)https://github.com/nodejs/node/actions/runs/11078730955 |
Landed in f5d454a |
When creating an fast api the callback might use the receiver. In that case if the internal binding is destructured the method won't have access to the reciver and it will throw. Passing the receiver as second argument ensures the receiver is available. PR-URL: #54408 Reviewed-By: Stephen Belanger <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Santiago Gimeno <[email protected]>
When creating an fast api the callback might use the receiver. In that case if the internal binding is destructured the method won't have access to the reciver and it will throw. Passing the receiver as second argument ensures the receiver is available. PR-URL: #54408 Reviewed-By: Stephen Belanger <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Santiago Gimeno <[email protected]>
When creating an fast api the callback might use the receiver. In that case if the internal binding is destructured the method won't have access to the reciver and it will throw. Passing the receiver as second argument ensures the receiver is available. PR-URL: nodejs#54408 Reviewed-By: Stephen Belanger <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Santiago Gimeno <[email protected]>
When creating an fast api the callback might use the receiver. In that case if the internal binding is destructured the method won't have access to the reciver and it will throw. Passing the receiver as second argument ensures the receiver is available. PR-URL: nodejs#54408 Reviewed-By: Stephen Belanger <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Santiago Gimeno <[email protected]>
When creating an fast api the callback might use the receiver. In that case if the internal binding is destructured the method won't have access to the reciver and it will throw. Passing the receiver as second argument ensures the receiver is available.