зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1202794 - Explicitly clear array in SortChildrenBy3DZOrder to satisfy the move analysis, r=mattwoodrow
This commit is contained in:
Родитель
469890ae16
Коммит
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);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче