summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Dawson <michael_dawson@ca.ibm.com>2019-07-17 14:39:56 -0400
committerMichaƫl Zasso <targos@protonmail.com>2019-07-22 21:20:41 +0200
commit8fe9ca416dabd6939103e240b2b97c9ff9bac2c6 (patch)
tree2995785c928aee7b4b962deffa2c077d043ca608
parent5c100075f09493be7cdf3e0fb15416a9e676c8d5 (diff)
downloadandroid-node-v8-8fe9ca416dabd6939103e240b2b97c9ff9bac2c6.tar.gz
android-node-v8-8fe9ca416dabd6939103e240b2b97c9ff9bac2c6.tar.bz2
android-node-v8-8fe9ca416dabd6939103e240b2b97c9ff9bac2c6.zip
doc: amplify warning for execute callback
Add specific recommendation not to use the to the napi-env parameter in napi_async_execute_callback PR-URL: https://github.com/nodejs/node/pull/28738 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
-rw-r--r--doc/api/n-api.md4
1 files changed, 4 insertions, 0 deletions
diff --git a/doc/api/n-api.md b/doc/api/n-api.md
index 8a669b5633..0a89781970 100644
--- a/doc/api/n-api.md
+++ b/doc/api/n-api.md
@@ -463,6 +463,8 @@ 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.
#### napi_async_complete_callback
<!-- YAML
@@ -4028,6 +4030,8 @@ 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.
+Avoid using the `napi_env` parameter in the execute callback as
+it will likely execute JavaScript.
These functions implement the following interfaces: