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

Function SetPrototypeMethod

nan.h:2622–2635  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2620}
2621
2622inline void SetPrototypeMethod(
2623 v8::Local<v8::FunctionTemplate> recv
2624 , const char* name
2625 , FunctionCallback callback
2626 , v8::Local<v8::Value> data = v8::Local<v8::Value>()) {
2627 HandleScope scope;
2628 v8::Local<v8::FunctionTemplate> t = New<v8::FunctionTemplate>(
2629 callback
2630 , data
2631 , New<v8::Signature>(recv));
2632 v8::Local<v8::String> fn_name = New(name).ToLocalChecked();
2633 recv->PrototypeTemplate()->Set(fn_name, t);
2634 t->SetClassName(fn_name);
2635}
2636
2637//=== Accessors and Such =======================================================
2638#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 14 \

Callers 7

NAN_MODULE_INITMethod · 0.85
NAN_MODULE_INITMethod · 0.85
NAN_MODULE_INITFunction · 0.85
NAN_MODULE_INITFunction · 0.85
NAN_MODULE_INITFunction · 0.85
NAN_MODULE_INITFunction · 0.85
NAN_MODULE_INITMethod · 0.85

Calls 3

ToLocalCheckedMethod · 0.80
NewFunction · 0.70
SetMethod · 0.45

Tested by

no test coverage detected