MCPcopy Index your code
hub / github.com/nodejs/node-addon-api / WrappedMethod

Method WrappedMethod

napi-inl.h:4876–4884  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4874template <typename T>
4875template <typename InstanceWrap<T>::InstanceSetterCallback method>
4876inline napi_value InstanceWrap<T>::WrappedMethod(
4877 napi_env env, napi_callback_info info) NAPI_NOEXCEPT {
4878 return details::WrapCallback(env, [&] {
4879 const CallbackInfo cbInfo(env, info);
4880 T* instance = T::Unwrap(cbInfo.This().As<Object>());
4881 if (instance) (instance->*method)(cbInfo, cbInfo[0]);
4882 return nullptr;
4883 });
4884}
4885
4886////////////////////////////////////////////////////////////////////////////////
4887// ObjectWrap<T> class

Callers

nothing calls this directly

Calls 2

WrapCallbackFunction · 0.85
ThisMethod · 0.80

Tested by

no test coverage detected