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

Function MakeAsyncCallbackWithInitList

test/function_reference.cc:98–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

96}
97
98Value MakeAsyncCallbackWithInitList(const Napi::CallbackInfo& info) {
99 Napi::FunctionReference ref;
100 ref.Reset(info[0].As<Function>());
101
102 Napi::AsyncContext context(info.Env(), "func_ref_resources", {});
103
104 return MaybeUnwrap(
105 ref.MakeCallback(Napi::Object::New(info.Env()), {}, context));
106}
107
108Value MakeAsyncCallbackWithVector(const Napi::CallbackInfo& info) {
109 Napi::FunctionReference ref;

Callers

nothing calls this directly

Calls 4

MaybeUnwrapFunction · 0.85
ResetMethod · 0.80
EnvMethod · 0.80
MakeCallbackMethod · 0.80

Tested by

no test coverage detected