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

Method NewInstance

test/cpp/methodswithdata.cpp:49–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47}
48
49v8::Local<v8::Value> SetterGetter::NewInstance () {
50 EscapableHandleScope scope;
51 v8::Local<v8::FunctionTemplate> constructorHandle =
52 Nan::New(settergetter_constructor);
53 v8::Local<v8::Object> instance =
54 Nan::NewInstance(
55 Nan::GetFunction(constructorHandle).ToLocalChecked()).ToLocalChecked();
56 return scope.Escape(instance);
57}
58
59NAN_METHOD(SetterGetter::New) {
60 std::string datavalue = *Nan::Utf8String(info.Data());

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected