mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-03 07:01:19 +00:00
Bug 1202794 - Explicitly clear array in SortChildrenBy3DZOrder to satisfy the move analysis, r=mattwoodrow
This commit is contained in:
parent
469890ae16
commit
b4d95d7c97
@ -1197,6 +1197,12 @@ ContainerLayer::SortChildrenBy3DZOrder(nsTArray<Layer*>& aArray)
|
||||
if (toSort.Length() > 0) {
|
||||
SortLayersBy3DZOrder(toSort);
|
||||
aArray.AppendElements(Move(toSort));
|
||||
// XXX The move analysis gets confused here, because toSort gets moved
|
||||
// here, and then gets used again outside of the loop. To clarify that
|
||||
// we realize that the array is going to be empty to the move checker,
|
||||
// we clear it again here. (This method renews toSort for the move
|
||||
// analysis)
|
||||
toSort.ClearAndRetainStorage();
|
||||
}
|
||||
aArray.AppendElement(l);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user