MCPcopy Create free account
hub / github.com/nodejs/node-addon-api / CallWithReceiverAndVectorUsingCppWrapper

Function CallWithReceiverAndVectorUsingCppWrapper

test/function.cc:121–130  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

119}
120
121Value CallWithReceiverAndVectorUsingCppWrapper(const CallbackInfo& info) {
122 Function func = info[0].As<Function>();
123 Value receiver = info[1];
124 std::vector<Value> args;
125 args.reserve(3);
126 args.push_back(info[2]);
127 args.push_back(info[3]);
128 args.push_back(info[4]);
129 return MaybeUnwrap(func.Call(receiver, args));
130}
131
132Value CallWithInvalidReceiver(const CallbackInfo& info) {
133 Function func = info[0].As<Function>();

Callers

nothing calls this directly

Calls 2

MaybeUnwrapFunction · 0.85
CallMethod · 0.80

Tested by

no test coverage detected