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

Function IndexQueryCallbackWrapper

nan_callbacks_pre_12_inl.h:510–522  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

508 (uint32_t, const v8::AccessorInfo &);
509
510static
511v8::Handle<v8::Integer> IndexQueryCallbackWrapper(
512 uint32_t index, const v8::AccessorInfo &info) {
513 v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
514 PropertyCallbackInfo<v8::Integer>
515 cbinfo(info, obj->GetInternalField(kDataIndex));
516 IndexQueryCallback callback = reinterpret_cast<IndexQueryCallback>(
517 reinterpret_cast<intptr_t>(
518 obj->GetInternalField(kIndexPropertyQueryIndex)
519 .As<v8::External>()->Value()));
520 callback(index, cbinfo);
521 return ReturnValueImp<v8::Integer>(cbinfo.GetReturnValue()).Value();
522}
523
524typedef v8::Handle<v8::Integer> (*NativeIndexQuery)
525 (uint32_t, const v8::AccessorInfo &);

Callers

nothing calls this directly

Calls 4

callbackFunction · 0.85
GetInternalFieldMethod · 0.80
ValueMethod · 0.80
GetReturnValueMethod · 0.45

Tested by

no test coverage detected