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

Method Test

test/finalizer_order.cc:6–13  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4class Test : public Napi::ObjectWrap<Test> {
5 public:
6 Test(const Napi::CallbackInfo& info) : Napi::ObjectWrap<Test>(info) {
7 basicFinalizerCalled = false;
8 finalizerCalled = false;
9
10 if (info.Length() > 0) {
11 finalizeCb_ = Napi::Persistent(info[0].As<Napi::Function>());
12 }
13 }
14
15 static void Initialize(Napi::Env env, Napi::Object exports) {
16 exports.Set("Test",

Callers

nothing calls this directly

Calls 2

PersistentFunction · 0.85
LengthMethod · 0.80

Tested by

no test coverage detected