Commit cb949057 authored by Gabriel Schulhof's avatar Gabriel Schulhof
Browse files

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: default avatarJason Ginchereau <jasongin@microsoft.com>
Reviewed-By: default avatarColin Ihrig <cjihrig@gmail.com>
Re: https://github.com/nodejs/node-chakracore/issues/380
parent c1fce1ee
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment