Skip to content

Implement FinalizationRegistry#5101

Draft
jedel1043 wants to merge 5 commits intoboa-dev:mainfrom
jedel1043:finalization-registry
Draft

Implement FinalizationRegistry#5101
jedel1043 wants to merge 5 commits intoboa-dev:mainfrom
jedel1043:finalization-registry

Conversation

@jedel1043
Copy link
Member

Funny GC with its funny semantics

anyways, this implements the last big feature we were missing from the spec. It uses the same pattern from Atomics.waitAsync of (ab)using async jobs to enqueue a cleanup task on a later point in time.

@github-actions github-actions bot added Waiting On Review Waiting on reviews from the maintainers C-Dependencies Pull requests that update a dependency file C-CLI Issues and PRs related to the Boa command line interface. C-Tests Issues and PRs related to the tests. C-Builtins PRs and Issues related to builtins/intrinsics C-GC Issue related to garbage collection and removed Waiting On Review Waiting on reviews from the maintainers labels Mar 15, 2026
@github-actions github-actions bot added this to the v1.0.0 milestone Mar 15, 2026
@github-actions github-actions bot added the Waiting On Review Waiting on reviews from the maintainers label Mar 15, 2026
@github-actions
Copy link

Test262 conformance changes

Test result main count PR count difference
Total 52,963 52,963 0
Passed 50,070 50,070 0
Ignored 2,072 2,025 -47
Failed 821 868 +47
Panics 0 0 0
Conformance 94.54% 94.54% 0.00%

Tested main commit: 965f38c66d22dbcda4746d9b79c607189530287d
Tested PR commit: bcc2759dab8f6dbadef37a3886801eb8ad192f80
Compare commits: 965f38c...bcc2759

@codecov
Copy link

codecov bot commented Mar 15, 2026

Codecov Report

❌ Patch coverage is 12.66667% with 131 lines in your changes missing coverage. Please review.
✅ Project coverage is 58.97%. Comparing base (6ddc2b4) to head (bcc2759).
⚠️ Report is 857 commits behind head on main.

Files with missing lines Patch % Lines
...e/engine/src/builtins/finalization_registry/mod.rs 5.17% 110 Missing ⚠️
...ine/src/object/builtins/jsfinalization_registry.rs 0.00% 12 Missing ⚠️
core/engine/src/job.rs 45.45% 6 Missing ⚠️
core/gc/src/pointers/ephemeron.rs 50.00% 2 Missing ⚠️
core/engine/src/object/jsobject.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #5101       +/-   ##
===========================================
+ Coverage   47.24%   58.97%   +11.72%     
===========================================
  Files         476      565       +89     
  Lines       46892    62816    +15924     
===========================================
+ Hits        22154    37044    +14890     
- Misses      24738    25772     +1034     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Labels

C-Builtins PRs and Issues related to builtins/intrinsics C-CLI Issues and PRs related to the Boa command line interface. C-Dependencies Pull requests that update a dependency file C-GC Issue related to garbage collection C-Tests Issues and PRs related to the tests. Waiting On Review Waiting on reviews from the maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant