mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1129424 - Remove obsolete check that shape's parent hasn't been reallocated r=terrence
This commit is contained in:
parent
dad72b4dba
commit
26c3b8560d
@ -199,26 +199,13 @@ Shape::sweep()
|
||||
/*
|
||||
* We detach the child from the parent if the parent is reachable.
|
||||
*
|
||||
* Note that due to incremental sweeping, the parent pointer may point
|
||||
* to the original reachable parent, or it may point to a new live
|
||||
* object allocated in the same cell that used to hold the parent.
|
||||
*
|
||||
* There are three cases:
|
||||
*
|
||||
* Case 1: parent is not marked - parent is unreachable, may have been
|
||||
* finalized, and the cell may subsequently have been
|
||||
* reallocated to a compartment that is not being marked (cells
|
||||
* are marked when allocated in a compartment that is currenly
|
||||
* being marked by the collector).
|
||||
*
|
||||
* Case 2: parent is marked and is in a different compartment - parent
|
||||
* has been freed and reallocated to compartment that was being
|
||||
* marked.
|
||||
*
|
||||
* Case 3: parent is marked and is in the same compartment - parent is
|
||||
* stil reachable and we need to detach from it.
|
||||
* This test depends on shape arenas not being freed until after we finish
|
||||
* incrementally sweeping them. If that were not the case the parent pointer
|
||||
* could point to a marked cell that had been deallocated and then
|
||||
* reallocated, since allocating a cell in a zone that is being marked will
|
||||
* set the mark bit for that cell.
|
||||
*/
|
||||
if (parent && parent->isMarked() && parent->compartment() == compartment()) {
|
||||
if (parent && parent->isMarked()) {
|
||||
if (inDictionary()) {
|
||||
if (parent->listp == &parent)
|
||||
parent->listp = nullptr;
|
||||
|
Loading…
Reference in New Issue
Block a user