Bug 968001 - In OpSetRoot, check that the new root is a root - r=nical

This commit is contained in:
Benoit Jacob 2014-02-20 15:05:08 -05:00
parent 286ab8ebd3
commit 513b00930e

View File

@ -390,7 +390,11 @@ LayerTransactionParent::RecvUpdate(const InfallibleTArray<Edit>& cset,
case Edit::TOpSetRoot: { case Edit::TOpSetRoot: {
MOZ_LAYERS_LOG(("[ParentSide] SetRoot")); MOZ_LAYERS_LOG(("[ParentSide] SetRoot"));
mRoot = AsLayerComposite(edit.get_OpSetRoot())->AsLayer(); Layer* newRoot = AsLayerComposite(edit.get_OpSetRoot())->AsLayer();
if (newRoot->GetParent()) {
return false;
}
mRoot = newRoot;
break; break;
} }
case Edit::TOpInsertAfter: { case Edit::TOpInsertAfter: {