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

Function NAN_PROPERTY_GETTER

test/cpp/namedinterceptors.cpp:75–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73
74
75NAN_PROPERTY_GETTER(NamedInterceptor::PropertyGetter) {
76 NamedInterceptor* interceptor =
77 ObjectWrap::Unwrap<NamedInterceptor>(info.Holder());
78 if (!std::strcmp(*Nan::Utf8String(property), "prop")) {
79 info.GetReturnValue().Set(Nan::New(interceptor->buf).ToLocalChecked());
80 } else {
81 info.GetReturnValue().Set(Nan::New("bar").ToLocalChecked());
82 }
83 return Intercepted::Yes();
84}
85
86NAN_PROPERTY_SETTER(NamedInterceptor::PropertySetter) {
87 NamedInterceptor* interceptor =

Callers

nothing calls this directly

Calls 6

Utf8StringClass · 0.85
YesFunction · 0.85
ToLocalCheckedMethod · 0.80
NewFunction · 0.50
SetMethod · 0.45
GetReturnValueMethod · 0.45

Tested by

no test coverage detected