Skip to content

Commit

Permalink
doc: simplify wording in n-api doc
Browse files Browse the repository at this point in the history
Simplify/clarify wording documenting n-api execute
callback.

PR-URL: #29441
Reviewed-By: Jiawen Geng <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
  • Loading branch information
mhdawson authored and targos committed Sep 20, 2019
1 parent fa949ca commit a9d16b5
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions doc/api/n-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -548,12 +548,12 @@ operations. Callback functions must satisfy the following signature:
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.
Avoid using the `napi_env` parameter in the execute callback as
it will likely execute JavaScript.
Implementations of this function must avoid making N-API calls
that execute JavaScript or interact with
JavaScript objects. N-API
calls should be in the `napi_async_complete_callback` instead.
Do not use the `napi_env` parameter as it will likely
result in execution of JavaScript.

#### napi_async_complete_callback
<!-- YAML
Expand Down

0 comments on commit a9d16b5

Please sign in to comment.