-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
Closed
Labels
async_hooksIssues and PRs related to the async hooks subsystem.Issues and PRs related to the async hooks subsystem.node-apiIssues and PRs related to the Node-API.Issues and PRs related to the Node-API.
Description
- Version: n-api v6
- Platform: all
- Subsystem: n-api
napi_open_callback_scope accepts an napi_value resource_object and another napi_async_context context, while an napi_async_context has to be created with an napi_value async_resource and its associated napi_value async_resource_name. In this case, napi_open_callback_scope can infer resource_object to the given napi_async_context.
Unfortunately, napi_async_context currently doesn't hold a reference to its async_resource. So napi_open_callback_scope is unable to access the resource_object too.
This also creates a potential conflict that which resource object should represent the executionAsyncResource of the napi_callback_scope.
Metadata
Metadata
Assignees
Labels
async_hooksIssues and PRs related to the async hooks subsystem.Issues and PRs related to the async hooks subsystem.node-apiIssues and PRs related to the Node-API.Issues and PRs related to the Node-API.