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

Function ConstructRefFromExisitingRef

test/function_reference.cc:32–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30namespace {
31
32Value ConstructRefFromExisitingRef(const CallbackInfo& info) {
33 EscapableHandleScope scope(info.Env());
34 FunctionReference ref;
35 FunctionReference movedRef;
36 ref.Reset(info[0].As<Function>());
37 movedRef = std::move(ref);
38
39 return scope.Escape(MaybeUnwrap(movedRef({})));
40}
41
42Value CallWithVectorArgs(const CallbackInfo& info) {
43 EscapableHandleScope scope(info.Env());

Callers

nothing calls this directly

Calls 4

MaybeUnwrapFunction · 0.85
EnvMethod · 0.80
ResetMethod · 0.80
EscapeMethod · 0.80

Tested by

no test coverage detected