Repository navigation
Conversation
cbf147f to
e214630
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #66482 +/- ##
=======================================
Coverage 90.47% 90.47%
=======================================
Files 791 791
Lines 277088 277101 +13
Branches 53276 53276
=======================================
+ Hits 250686 250707 +21
+ Misses 16813 16802 -11
- Partials 9589 9592 +3
🚀 New features to boost your workflow:
|
Commit Queue failedThe pull request was removed from the Commit Queue and labeled
commit-queue-failed
Full Commit Queue output |
process.finalization.register() and registerBeforeExit() now return a function that removes only that registration, leaving other registrations for the same object in place. The function does not hold a strong reference to the object. Each registration now uses its WeakRef as the unregister token, which also makes process.finalization.unregister() remove the entries from the FinalizationRegistry; previously it passed the object as the token, which was never registered, so the call had no effect. Signed-off-by: Matteo Collina <hello@matteocollina.com>
Commit Queue failed
The pull request was removed from the Commit Queue and labeled
commit-queue-failed
Full Commit Queue output |
e214630 to
4a67914
Compare
process.finalization.register()andprocess.finalization.registerBeforeExit()now return a function that removes that specific registration:Other registrations for the same object are left in place, calling the function more than once is a no-op, and the function does not hold a strong reference to
obj.Each registration now uses its
WeakRefas theFinalizationRegistryunregister token. This also fixesprocess.finalization.unregister(obj), which calledregistry.unregister(obj)althoughobjwas never passed as a token, so the registry entries were never removed.AI generated. Reviewed by me.