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

Function CallWithVectorArgs

test/function_reference.cc:42–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40}
41
42Value CallWithVectorArgs(const CallbackInfo& info) {
43 EscapableHandleScope scope(info.Env());
44 std::vector<napi_value> newVec;
45 FunctionReference ref;
46 ref.Reset(info[0].As<Function>());
47
48 for (int i = 1; i < (int)info.Length(); i++) {
49 newVec.push_back(info[i]);
50 }
51 return scope.Escape(MaybeUnwrap(ref.Call(newVec)));
52}
53
54Value CallWithInitList(const CallbackInfo& info) {
55 EscapableHandleScope scope(info.Env());

Callers

nothing calls this directly

Calls 6

MaybeUnwrapFunction · 0.85
EnvMethod · 0.80
ResetMethod · 0.80
LengthMethod · 0.80
EscapeMethod · 0.80
CallMethod · 0.80

Tested by

no test coverage detected