Pull Request #3 [pull] master from nodejs:master

This change reduces the places where we declare private functions with
the `napi_callback` signature for the purpose of using them with C++
callbacks passed as template arguments. We basically have 4 types:

1. static with `void` return
2. static with `napi_value` return
3. instance with `void` return
4. instance with `napi_value` return

We can use one of these four calling patterns in the following places
where we accept callbacks as template arguments:
* `Napi::Function` (1. and 2.)
* `Napi::PropertyDescriptor` (1. for the setter, 2. for the getter)
* `Napi::InstanceWrap<T>` (3., 4. for instance methods, 4. for
instance getters)
* `Napi::ObjectWrap<T>` (1., 2. for static methods, 2. for static
getters)

In the case of `InstanceWrap<T>` and `ObjectWrap<T>` instance resp.
static property descriptors we can also remove the infrastructure
designed to allow for optional getters (`GetterTag` resp.
`StaticGetterTag`) because the API for specifying instance resp. class
property descriptors does not allow one to omit the getter.

Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com>
PR-URL: https://github.com/nodejs/node-addon-api/pull/786
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>

 avatar pull[bot]

Pull request event #4 errored

  • Ran for
  • Total time
  • New branch build