fix tag GC deleting protected tags
This commit is contained in:
parent
58433bfb95
commit
d1e1f76afe
@ -74,7 +74,7 @@ pub struct FrameState {
|
|||||||
|
|
||||||
impl VisitTags for FrameState {
|
impl VisitTags for FrameState {
|
||||||
fn visit_tags(&self, _visit: &mut dyn FnMut(BorTag)) {
|
fn visit_tags(&self, _visit: &mut dyn FnMut(BorTag)) {
|
||||||
// `protected_tags` are fine to GC.
|
// `protected_tags` are already recorded by `GlobalStateInner`.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -108,9 +108,12 @@ pub struct GlobalStateInner {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl VisitTags for GlobalStateInner {
|
impl VisitTags for GlobalStateInner {
|
||||||
fn visit_tags(&self, _visit: &mut dyn FnMut(BorTag)) {
|
fn visit_tags(&self, visit: &mut dyn FnMut(BorTag)) {
|
||||||
// The only candidate is base_ptr_tags, and that does not need visiting since we don't ever
|
for &tag in self.protected_tags.keys() {
|
||||||
// GC the bottommost tag.
|
visit(tag);
|
||||||
|
}
|
||||||
|
// The only other candidate is base_ptr_tags, and that does not need visiting since we don't ever
|
||||||
|
// GC the bottommost/root tag.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user