MCPcopy Create free account
hub / github.com/nodejs/nan / NAN_METHOD

Function NAN_METHOD

test/cpp/makecallback.cpp:50–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48}
49
50NAN_METHOD(MyObject::New) {
51 if (info.IsConstructCall()) {
52 MyObject* obj = new MyObject(info.This());
53 obj->Wrap(info.This());
54 info.GetReturnValue().Set(info.This());
55 } else {
56 v8::Local<v8::Function> cons = Nan::New<v8::Function>(constructor);
57 info.GetReturnValue().Set(Nan::NewInstance(cons).ToLocalChecked());
58 }
59}
60
61NAN_METHOD(MyObject::CallEmit) {
62 v8::Local<v8::Value> argv[1] = {

Callers

nothing calls this directly

Calls 8

WrapMethod · 0.80
ToLocalCheckedMethod · 0.80
runInAsyncScopeMethod · 0.80
NewInstanceFunction · 0.50
NewFunction · 0.50
SetMethod · 0.45
GetReturnValueMethod · 0.45
SetUndefinedMethod · 0.45

Tested by

no test coverage detected