Refactor FinalizationRegistry implementation by removing global record set
Categories
(Core :: JavaScript: GC, task)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox144 | --- | fixed |
People
(Reporter: jonco, Assigned: jonco)
References
Details
Attachments
(1 external file)
Following on from recent work in bug 1984091 we can simplify the FinalizationRegistry implementation by removing the set of finalization records associated with each global.
| Assignee | ||
Comment 1•1 year ago
|
||
This simplifies the finalization registry implementation by removing
FinalizationRegistryGlobalData, a data structure that currently holds a set of
all registered FinalizationRecordObjects for each global. This is replaced with
a vector held by the finalization registy itself.
This means that the records are held alive by the registry they are registered
with. This simplifies sweeping because we don't need to check for unregistered
records as we now remove them when they are unregistered.
I updated the diagram of how this all works, which previously didn't include
the global data. I also updated the comments here which I missed in bug
1984091.
This has also restore the original behaviour of test gc/bug-1825936.js which
now no longer catches an error thrown in a separate global after nuking CCWs. I
don't exactly understand this but since this was the original behaviour before
the recent changes I assume it's OK.
Updated•1 year ago
|
Comment 4•1 year ago
|
||
Backed out for causing dt assertion failures @ gray marking
Backout link: https://hg.mozilla.org/integration/autoland/rev/af5d86afcfd76a7c5fcea26b63777850f9b8367b
Comment 6•1 year ago
|
||
| bugherder | ||
| Assignee | ||
Updated•1 year ago
|
Description
•