WeakRefs don't work with cross-zone targets
Categories
(Core :: JavaScript: GC, defect, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox99 | --- | fixed |
People
(Reporter: jonco, Assigned: jonco)
References
Details
Attachments
(4 files)
When investigating optimising the way we implement the kept objects set used by WeakRefs, I noticed they didn't work at all when their target is in another zone. Doing this results in the WeakRef returning undfined from the deref() method after GC, even if the target is still alive.
I don't know how often these are used with cross-zone targets or how to arrange this in the browser but I assume it's possible.
Updated•3 years ago
|
| Assignee | ||
Comment 1•3 years ago
|
||
| Assignee | ||
Comment 2•3 years ago
|
||
This renames crossZoneWarppers to crossZoneRecordWrappers and makes
add/RemoveCrossZoneWarpper take the set as an argument.
Depends on D139835
| Assignee | ||
Comment 3•3 years ago
|
||
This fixes weak ref behaviour with cross zone targets. Previously the wrapper
died because there was nothing to keep it alive and the weak ref target was
cleared, even if the target was still alive.
Depends on D139836
| Assignee | ||
Comment 4•3 years ago
|
||
Depends on D139837
Comment 6•3 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/59ae32a4a0a3
https://hg.mozilla.org/mozilla-central/rev/8e7816b5ea2a
https://hg.mozilla.org/mozilla-central/rev/eac621ee0ea8
https://hg.mozilla.org/mozilla-central/rev/2f4c3dcd4a8d
Description
•