| 200 | } |
| 201 | |
| 202 | void MakeCallbackWithCStyleArray(const CallbackInfo& info) { |
| 203 | Env env = info.Env(); |
| 204 | Function callback = info[0].As<Function>(); |
| 205 | Object resource = info[1].As<Object>(); |
| 206 | |
| 207 | AsyncContext context(env, "function_test_context", resource); |
| 208 | |
| 209 | std::vector<napi_value> args; |
| 210 | args.reserve(3); |
| 211 | args.push_back(info[2]); |
| 212 | args.push_back(info[3]); |
| 213 | args.push_back(info[4]); |
| 214 | callback.MakeCallback(resource, args.size(), args.data(), context); |
| 215 | } |
| 216 | |
| 217 | void MakeCallbackWithInvalidReceiver(const CallbackInfo& info) { |
| 218 | Function callback = info[0].As<Function>(); |
nothing calls this directly
no test coverage detected