Skip to content

feat: port test_general testFinalizer to CTS - #75

Open
bavulapati wants to merge 2 commits into
nodejs:mainfrom
bavulapati:feat/port-test-general-finalizer
Open

feat: port test_general testFinalizer to CTS#75
bavulapati wants to merge 2 commits into
nodejs:mainfrom
bavulapati:feat/port-test-general-finalizer

Conversation

@bavulapati

Copy link
Copy Markdown
Contributor

Ports testFinalizer.js, plus the unwrap binding it needs.

addFinalizerOnly calls back into JS from a finalizer, which is only legal via node_api_post_finalizer. That is experimental, so it builds as a separate test_general_finalizer addon gated on experimentalFeatures.postFinalizer, leaving the stable test_general addon loadable everywhere.

Upstream calls gc() once and relies on the exit-time check; this waits with gcUntil instead, since the callbacks are posted rather than run inline during GC.

Stacked on #72 - review that first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Need Triage

Development

Successfully merging this pull request may close these issues.

1 participant