Closed Bug 2032328 Opened 7 months ago Closed 6 months ago

FinalizationRegistries and WeakRefs are not updated after transplanting

Categories

(Core :: JavaScript: GC, defect, P3)

defect

Tracking

()

RESOLVED FIXED
152 Branch
Tracking Status
firefox151 --- fixed
firefox152 --- fixed

People

(Reporter: jonco, Assigned: jonco)

References

Details

Attachments

(2 external files)

Similar to bug 2031152. Transplanting an object doesn't update WeakRef/FinalizationRegistry state so can indicate that an object has died when the transplant target is still alive. I'm assuming the correct thing would be to track the new target. I don't know how often this comes up or how reachable this is from the browser.

We transplant for adoptNode and for outer window proxies when they navigate in or out of process.

See Also: → 2032512

Bug 2032512 handled this for WeakRefs but FinalizationRegistries are still broken.

Assignee: nobody → jcoppeard
Depends on: 2032512

The same as for WeakRefs, we need to move FinalizationRegistry records when
their target is transplanted.

Duplicate of this bug: 2035211
Status: NEW → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → 152 Branch

The same as for WeakRefs, we need to move FinalizationRegistry records when
their target is transplanted.

Original Revision: https://phabricator.services.mozilla.com/D296688

Attachment #9575443 - Flags: approval-mozilla-beta?

firefox-beta Uplift Approval Request

  • User impact if declined/Reason for urgency: While the bug is not marked as security sensitive, it's possible that someone might find a way to exploit this problem. Since the pwn2own competition is coming up I'm requesting upflift out of an abundance of caution.
  • Code covered by automated testing?: yes
  • Fix verified in Nightly?: yes
  • Needs manual QE testing?: no
  • Steps to reproduce for manual QE testing:
  • Risk associated with taking this patch: low
  • Explanation of risk level: This is a straightfoward fix along the same lines as previously fixed bug 2032512. It's been on central for two days with no reported issues.
  • String changes made/needed?: None.
  • Is Android affected?: yes
Attachment #9575443 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Regressions: CVE-2026-74938
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: