Bug 1000104 - Fix error handling in RecvSetAsyncScrollOffset - r=kats

This commit is contained in:
Benoit Jacob 2014-04-23 10:42:40 -04:00
parent 7374927d9c
commit 6f8d5c926c

View File

@ -674,13 +674,17 @@ LayerTransactionParent::RecvSetAsyncScrollOffset(PLayerParent* aLayer,
return false; return false;
} }
ContainerLayer* layer = cast(aLayer)->AsLayer()->AsContainerLayer(); Layer* layer = cast(aLayer)->AsLayer();
if (!layer) { if (!layer) {
return true; return false;
} }
AsyncPanZoomController* controller = layer->GetAsyncPanZoomController(); ContainerLayer* containerLayer = layer->AsContainerLayer();
if (!containerLayer) {
return false;
}
AsyncPanZoomController* controller = containerLayer->GetAsyncPanZoomController();
if (!controller) { if (!controller) {
return true; return false;
} }
controller->SetTestAsyncScrollOffset(CSSPoint(aX, aY)); controller->SetTestAsyncScrollOffset(CSSPoint(aX, aY));
return true; return true;