node/test/js-native-api/6_object_wrap/binding.gyp
Chengzhong Wu 3b90f3454d
node-api: add nested object wrap and napi_ref test
Test that an napi_ref can be nested inside another ObjectWrap. The test
shows a critical case where a finalizer deletes an `napi_ref` whose
finalizer is also scheduled.

PR-URL: https://github.com/nodejs/node/pull/57981
Reviewed-By: Vladimir Morozov <vmorozov@microsoft.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2025-04-25 22:22:30 +00:00

29 lines
552 B
Python

{
"targets": [
{
"target_name": "myobject",
"sources": [
"myobject.cc",
"myobject.h",
]
},
{
"target_name": "myobject_basic_finalizer",
"defines": [ "NAPI_EXPERIMENTAL" ],
"sources": [
"myobject.cc",
"myobject.h",
]
},
{
"target_name": "nested_wrap",
# Test without basic finalizers as it schedules differently.
"defines": [ "NAPI_VERSION=10" ],
"sources": [
"nested_wrap.cc",
"nested_wrap.h",
],
},
]
}