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

Method NewInstance

test/cpp/accessors.cpp:69–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67}
68
69v8::Local<v8::Value> SetterGetter::NewInstance () {
70 EscapableHandleScope scope;
71 v8::Local<v8::FunctionTemplate> constructorHandle =
72 Nan::New(settergetter_constructor);
73 v8::Local<v8::Object> instance =
74 Nan::NewInstance(
75 Nan::GetFunction(constructorHandle).ToLocalChecked()).ToLocalChecked();
76 return scope.Escape(instance);
77}
78
79NAN_METHOD(SetterGetter::New) {
80 SetterGetter* settergetter = new SetterGetter();

Callers 3

NewInstanceFunction · 0.45
NewMethod · 0.45
NewInstanceFunction · 0.45

Calls 5

ToLocalCheckedMethod · 0.80
EscapeMethod · 0.80
NewFunction · 0.50
NewInstanceFunction · 0.50
GetFunctionFunction · 0.50

Tested by

no test coverage detected