Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions doc/api/n-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,10 @@ typedef void (*napi_async_execute_callback)(napi_env env, void* data);
Implementations of this type of function should avoid making any N-API calls
that could result in the execution of JavaScript or interaction with
JavaScript objects. Most often, any code that needs to make N-API
calls should be made in `napi_async_complete_callback` instead.
calls should be made in `napi_async_complete_callback` instead. The
current recommendation is to avoid all usage of the
napi_env parameter in the execute callback as it will most
Comment thread
mhdawson marked this conversation as resolved.
Outdated
likely cause JavaScript to be executed.

#### napi_async_complete_callback
<!-- YAML
Expand Down Expand Up @@ -4027,7 +4030,10 @@ task respectively.
The `execute` function should avoid making any N-API calls
that could result in the execution of JavaScript or interaction with
JavaScript objects. Most often, any code that needs to make N-API
calls should be made in `complete` callback instead.
calls should be made in `complete` callback instead. The
current recommendation is to avoid all usage of the
napi_env parameter in the execute callback as it will most
Comment thread
mhdawson marked this conversation as resolved.
Outdated
likely cause JavaScript to be executed.

These functions implement the following interfaces:

Expand Down