Skip to content

node-api: Loosen restriction on the type of value that we can create a ref on

In a recent discussion in NAPI regarding handling exceptions thrown by Javascript code that are not objects (https://github.com/nodejs/node-addon-api/issues/912) , we've discovered that unlike with other primitives (numbers, string, etc), symbol values cannot be retrieved. To deal with this issue we've decided to loosen the restriction on the type of values that napi_create_reference can receive. (At the moment only function and object types are allowed)

Merge request reports

Loading