nodejs-github-bot · GitHub

@nodejs-github-bot added 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.

labels

Sep 9, 2025

legendecas

@addaleax

legendecas

This is a follow-up to  234c26c . The Node-API interface does
not allow us to enforce that values are stored in a specific location,
e.g. on the stack or not; however, V8 requires `Local<>` handles
to be stored on the stack.
To circumvent this restriction, we add the ability to the async handle
stack to store either `Local<>*` pointers or `Global<>*` pointers, with
Node-API making use of the latter.
There already is an existing requirement to have matching calls of
`napi_async_init()` and `napi_async_destroy()`, so expecting users
of this API to manually hold onto the resource for the duration of
the `napi_async_context`'s lifetime is unnecessary.
Weak callbacks are generally useful for when a corresponding C++
object should be cleaned up when a JS object is gargbage-collected,
but that is not the case here.

@addaleax

@addaleax

legendecas

@addaleax addaleax added author ready

PRs that have at least one approval, no pending requests for changes, and a CI started.

commit-queue

Add this label to land a pull request using GitHub Actions.

commit-queue-rebase

Add this label to allow the Commit Queue to land a PR in several commits.

labels

Sep 22, 2025

nodejs-github-bot pushed a commit that referenced this pull request

Sep 22, 2025
This is a follow-up to  234c26c . The Node-API interface does
not allow us to enforce that values are stored in a specific location,
e.g. on the stack or not; however, V8 requires `Local<>` handles
to be stored on the stack.
To circumvent this restriction, we add the ability to the async handle
stack to store either `Local<>*` pointers or `Global<>*` pointers, with
Node-API making use of the latter.
PR-URL: #59828
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>

nodejs-github-bot pushed a commit that referenced this pull request

Sep 22, 2025
There already is an existing requirement to have matching calls of
`napi_async_init()` and `napi_async_destroy()`, so expecting users
of this API to manually hold onto the resource for the duration of
the `napi_async_context`'s lifetime is unnecessary.
Weak callbacks are generally useful for when a corresponding C++
object should be cleaned up when a JS object is gargbage-collected,
but that is not the case here.
PR-URL: #59828
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>

@targos targos added the dont-land-on-v24.x

PRs that should not land on the v24.x-staging branch and should not be released in v24.x.

label

Sep 23, 2025

Merged

9 tasks

targos

Merged

targos added a commit to targos/node that referenced this pull request

Nov 25, 2025

nodejs-github-bot pushed a commit that referenced this pull request

Nov 26, 2025
Refs: #59828
PR-URL: #60802
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>

targos added a commit that referenced this pull request

Nov 27, 2025
Refs: #59828
PR-URL: #60802
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>

aduh95 pushed a commit that referenced this pull request

Jan 9, 2026
Refs: #59828
PR-URL: #60802
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>

RafaelGSS pushed a commit that referenced this pull request

Jan 13, 2026
Refs: #59828
PR-URL: #60802
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>

Read the original on github.com ↗