-
-
Notifications
You must be signed in to change notification settings - Fork 31.4k
node-api: add nested object wrap and napi_ref test #57981
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
node-api: add nested object wrap and napi_ref test #57981
Conversation
Review requested:
|
8fdaaaa
to
a5aa845
Compare
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.
a5aa845
to
161b8e3
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #57981 +/- ##
==========================================
- Coverage 90.27% 90.27% -0.01%
==========================================
Files 630 630
Lines 186165 186158 -7
Branches 36485 36475 -10
==========================================
- Hits 168064 168049 -15
- Misses 10974 10979 +5
- Partials 7127 7130 +3 🚀 New features to boost your workflow:
|
@legendecas , in regards to the PR #57861, do we ever have a situation when a |
This comment was marked as duplicate.
This comment was marked as duplicate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I think Putting a single finalizer into the queue twice is a bug. Do you have a minimum test to reproduce it? |
This comment was marked as outdated.
This comment was marked as outdated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@legendecas , no, I do not have a repro. I am just trying to understand if the PR #57861 has issues or not. Currently based on your answers, I tend to believe that it does not have issues. I wonder if you already saw any issues by running that PR against these new tests. |
@vmoroz I commented at #57861 (comment). The change in that PR crashes this new test. |
Landed in 3b90f34 |
Test that an napi_ref can be nested inside another ObjectWrap. The test
shows a critical case where a finalizer deletes an
napi_ref
whosefinalizer is also scheduled.
This add a test for comments at:
node/src/node_api.cc
Lines 116 to 118 in 68cc1c9
The changes in
test/js-native-api/6_object_wrap/myobject.cc
are auto-formatted bymake format-cpp
as the file is renamed.Refs: #57861 (review)