Repository navigation
Conversation
process.finalization only holds weak references to registered objects. `a` and `b` were not captured by any closure, so a GC before exit could collect `b`, skipping its exit callback and failing the assertion. Reference both objects from the exit listener so they stay reachable. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DQrzezHzwzfCYeh2cYm2U Signed-off-by: Matteo Collina <hello@matteocollina.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #66869 +/- ##
=======================================
Coverage 90.50% 90.51%
=======================================
Files 797 797
Lines 278195 278221 +26
Branches 53453 53472 +19
=======================================
+ Hits 251777 251825 +48
+ Misses 16795 16770 -25
- Partials 9623 9626 +3 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
test-process-finalizationflakes on Windows CI in theunregister-function.mjscase:process.finalizationholds registered objects only through weak references, and skips the callback at exit if the object is gone. In the fixture,aandbare top-level bindings that no closure captures, so a GC before exit can collectb. Its exit callback then never runs. The same could hide a broken unregister ofa.This references both objects from the
exitlistener so they stay reachable until the assertion runs.🤖 Generated with Claude Code
https://claude.ai/code/session_011DQrzezHzwzfCYeh2cYm2U