Bug 970747 - 6/6 - Make LayerTransactionParent::RecvUpdate error out if RepositionChild fails - r=mattwoodrow

This commit is contained in:
Benoit Jacob 2014-02-21 16:50:25 -05:00
parent 0c5e25c738
commit 7212d43233

View File

@ -457,10 +457,11 @@ LayerTransactionParent::RecvUpdate(const InfallibleTArray<Edit>& cset,
return false;
}
ContainerLayerComposite* container = ShadowContainer(orc)->AsContainerLayerComposite();
if (!container) {
if (!container ||
!container->RepositionChild(child, ShadowAfter(orc)->AsLayer()))
{
return false;
}
container->RepositionChild(child, ShadowAfter(orc)->AsLayer());
break;
}
case Edit::TOpRaiseToTopChild: {
@ -472,10 +473,11 @@ LayerTransactionParent::RecvUpdate(const InfallibleTArray<Edit>& cset,
return false;
}
ContainerLayerComposite* container = ShadowContainer(rtc)->AsContainerLayerComposite();
if (!container) {
if (!container ||
!container->RepositionChild(child, nullptr))
{
return false;
}
container->RepositionChild(child, nullptr);
break;
}
case Edit::TCompositableOperation: {