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

Function FunctionCallbackWrapper

nan_callbacks_12_inl.h:220–230  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

218namespace imp {
219
220static
221void FunctionCallbackWrapper(const v8::FunctionCallbackInfo<v8::Value> &info) {
222 v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
223 FunctionCallback callback = reinterpret_cast<FunctionCallback>(
224 reinterpret_cast<intptr_t>(
225 Nan::GetExternalValue(obj->GetInternalField(kFunctionIndex)
226 .As<v8::Value>().As<v8::External>())));
227 FunctionCallbackInfo<v8::Value>
228 cbinfo(info, obj->GetInternalField(kDataIndex).As<v8::Value>());
229 callback(cbinfo);
230}
231
232typedef void (*NativeFunction)(const v8::FunctionCallbackInfo<v8::Value> &);
233

Callers

nothing calls this directly

Calls 3

callbackFunction · 0.85
GetInternalFieldMethod · 0.80
GetExternalValueFunction · 0.70

Tested by

no test coverage detected