Add assertions to catch access to marking state in other zones by finalizers
Categories
(Core :: JavaScript: GC, task, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox71 | --- | fixed |
People
(Reporter: jonco, Assigned: jonco)
Details
Attachments
(1 file)
With a few expections, finalizers and sweeping code in general shouldn't depend on the marking state of GC things in other zones. Although IsMarked and IsAboutToBeFinalized will return sensible results (e.g. true and false respectively for non-collected zones), this is still an error. We should add assertions to catch this.
(Exceptions to this are be things like sweeping cross compartment wrappers, where the generic map sweeping code checks both key and value, and these can be in different zones).
Assignee | ||
Comment 1•6 years ago
|
||
This extends AutoSetThreadIsSweeping to take an optional zone parameter. When querying the marking state via IsAboutToBeFinalized and IsMarked calls we check this zone matches the zone of the thing we're looking at. This catches the problem in the Debugger.Frame finalizer.
Updated•6 years ago
|
![]() |
||
Comment 3•6 years ago
|
||
bugherder |
Description
•