Fix check for color of object.
This commit is contained in:
parent
d09d945323
commit
434a113d97
@ -114,9 +114,7 @@ fn collect_garbage(
|
||||
for stack_value in stack {
|
||||
match stack_value {
|
||||
DvmValue::Object(gc) => {
|
||||
if gc.color() == GcColor::White {
|
||||
gray_stack.push(gc.clone());
|
||||
}
|
||||
gray_stack.push(gc.clone());
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
@ -126,7 +124,9 @@ fn collect_garbage(
|
||||
for field in current.data().borrow().fields() {
|
||||
match field {
|
||||
DvmValue::Object(object) => {
|
||||
gray_stack.push(object.clone());
|
||||
if object.color() == GcColor::White {
|
||||
gray_stack.push(object.clone());
|
||||
}
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user