summaryrefslogtreecommitdiff
path: root/doc/api/n-api.md
diff options
context:
space:
mode:
authorGabriel Schulhof <gabriel.schulhof@intel.com>2017-09-09 12:15:14 +0300
committerGabriel Schulhof <gabriel.schulhof@intel.com>2017-09-13 06:19:50 +0300
commitcb9490577412046f050d786d7a0c842980149a20 (patch)
tree1b6b73dbbdc35da2a2da3599482db043f729e4a3 /doc/api/n-api.md
parentc1fce1eeb1cdd9c118b5e51ba74ee90b720c80b7 (diff)
downloadandroid-node-v8-cb9490577412046f050d786d7a0c842980149a20.tar.gz
android-node-v8-cb9490577412046f050d786d7a0c842980149a20.tar.bz2
android-node-v8-cb9490577412046f050d786d7a0c842980149a20.zip
n-api: stop creating references to primitives
The binding testing napi_wrap() creates references to primitives passed into the binding in its second parameter. This is unnecessary and not at all the point of the test. Additionally, creating persistent references to primitive values may not be supported by all VMs, since primitives are best persisted in their native form. Instead, the point of the test is to make sure that the finalize callback gets called when it should get called, that it gets called with the correct pointer, and that it does not get called when it should not get called. Creating persistent references is not necessary for verifying this. PR-URL: https://github.com/nodejs/node/pull/15289 Reviewed-By: Jason Ginchereau <jasongin@microsoft.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Re: https://github.com/nodejs/node-chakracore/issues/380
Diffstat (limited to 'doc/api/n-api.md')
-rw-r--r--doc/api/n-api.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/api/n-api.md b/doc/api/n-api.md
index e3d7dcce32..b9d06079fd 100644
--- a/doc/api/n-api.md
+++ b/doc/api/n-api.md
@@ -787,7 +787,7 @@ NODE_EXTERN napi_status napi_create_reference(napi_env env,
- `[in] env`: The environment that the API is invoked under.
- `[in] value`: `napi_value` representing the Object to which we want
-a reference to.
+a reference.
- `[in] initial_refcount`: Initial reference count for the new reference.
- `[out] result`: `napi_ref` pointing to the new reference.