Make cell iteration harder to misuse
Categories
(Core :: JavaScript: GC, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox67 | --- | fixed |
People
(Reporter: jonco, Assigned: pbone)
References
Details
Attachments
(3 files)
Following bug 1519037 we should refactor our zone cell iteration APIs to make them harder to misuse, specifically having a public version that filters out about-to-be-finalized cells during incremental sweeping.
I'm thinking the public one should be Zone::cellIter (which could use a filtered iterator built on ZoneCellIter) and we should switch to using ZoneCellIter directly in the GC.
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 1•5 years ago
|
||
ZoneCellIter can return cells that are about to be finalised in the next GC
slice. These cells can be used briefly but cannot be kept around and the GC
needs this behaviour.
This change introduces ZoneCellIterSafe which will not return about-to-be
finalised cells. Zone::cellIter() will use it now, the old behaviour is now
in cellIterUnsafe().
Update several uses of cellIter() to cellIterUnsafe() where that behaviour
is needed.
Assignee | ||
Comment 2•5 years ago
|
||
The new cellIter() now filters out cells that are about to be finalised.
Depends on D19890
Updated•5 years ago
|
Assignee | ||
Comment 3•5 years ago
|
||
Depends on D19891
Pushed by pbone@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d8ca9f5b4c24 (part 1) Add a SafeZoneCellIter, making cellIter() GC-safe r=sfink,arai https://hg.mozilla.org/integration/autoland/rev/a9070349961b (part 2) Remove reundant IsAboutToBeFinalised calls r=arai https://hg.mozilla.org/integration/autoland/rev/a68a646241f1 (part 3) Rename ZoneCellIter classes r=sfink
Comment 5•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/d8ca9f5b4c24
https://hg.mozilla.org/mozilla-central/rev/a9070349961b
https://hg.mozilla.org/mozilla-central/rev/a68a646241f1
Description
•