mirror of
https://github.com/zebrajr/node.git
synced 2025-12-06 12:20:27 +01:00
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>
29 lines
552 B
Python
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",
|
|
],
|
|
},
|
|
]
|
|
}
|