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

Function NAN_INDEX_GETTER

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

Source from the content-addressed store, hash-verified

73
74
75NAN_INDEX_GETTER(IndexedInterceptor::PropertyGetter) {
76 IndexedInterceptor* interceptor =
77 ObjectWrap::Unwrap<IndexedInterceptor>(info.Holder());
78 if (index == 0) {
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_INDEX_SETTER(IndexedInterceptor::PropertySetter) {
87 IndexedInterceptor* interceptor =

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected