Skip to content

Commit

Permalink
node-api: generalize finalizer second pass callback
Browse files Browse the repository at this point in the history
Generalize the finalizer's second pass callback to make it
cancellable and simplify the code around the second pass callback.

With this change, it is determined that Reference::Finalize or
RefBase::Finalize are called once, either from the env's shutdown,
or from the env's second pass callback.

All existing node-api js tests should pass without a touch. The
js_native_api cctest is no longer applicable with this change,
just removing it.

PR-URL: #44141
Refs: #44071
Reviewed-By: Michael Dawson <midawson@redhat.com>
  • Loading branch information
legendecas authored and RafaelGSS committed Jan 5, 2023
1 parent a89f8c1 commit f3bb6a3
Show file tree
Hide file tree
Showing 8 changed files with 317 additions and 413 deletions.
1 change: 0 additions & 1 deletion node.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -1003,7 +1003,6 @@
'test/cctest/test_base_object_ptr.cc',
'test/cctest/test_node_postmortem_metadata.cc',
'test/cctest/test_environment.cc',
'test/cctest/test_js_native_api_v8.cc',
'test/cctest/test_linked_binding.cc',
'test/cctest/test_node_api.cc',
'test/cctest/test_per_process.cc',
Expand Down
Loading

0 comments on commit f3bb6a3

Please sign in to comment.