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

Function PropertySetterCallbackWrapper

nan_callbacks_12_inl.h:331–344  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

329 (v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value> &);
330
331static
332v8::Intercepted PropertySetterCallbackWrapper(
333 v8::Local<v8::Name> property
334 , v8::Local<v8::Value> value
335 , const v8::PropertyCallbackInfo<void> &info) {
336 v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
337 PropertyCallbackInfo<void>
338 cbinfo(info, obj->GetInternalField(kDataIndex).As<v8::Value>());
339 PropertySetterCallback callback = reinterpret_cast<PropertySetterCallback>(
340 reinterpret_cast<intptr_t>(
341 Nan::GetExternalValue(obj->GetInternalField(kPropertySetterIndex)
342 .As<v8::Value>().As<v8::External>())));
343 return callback(property.As<v8::String>(), value, cbinfo);
344}
345
346typedef v8::Intercepted (*NativePropertySetter)(
347 v8::Local<v8::Name>

Callers

nothing calls this directly

Calls 3

callbackFunction · 0.85
GetInternalFieldMethod · 0.80
GetExternalValueFunction · 0.70

Tested by

no test coverage detected