Bug 570620, part a: Fix an assertion that will soon no longer hold and remove obsoleted already_AddRefed idiom in two places. r=roc

This commit is contained in:
Chris Jones 2010-08-05 17:11:23 -05:00
Родитель 0def0cbdc7
Коммит 0a4ea1e8b2
2 изменённых файлов: 2 добавлений и 7 удалений

Просмотреть файл

@ -468,9 +468,6 @@ FrameLayerBuilder::UpdateDisplayItemDataForFrame(nsPtrHashKey<nsIFrame>* aEntry,
if (!newDisplayItems->HasContainerLayer()) { if (!newDisplayItems->HasContainerLayer()) {
props.Delete(ThebesLayerInvalidRegionProperty()); props.Delete(ThebesLayerInvalidRegionProperty());
f->RemoveStateBits(NS_FRAME_HAS_CONTAINER_LAYER); f->RemoveStateBits(NS_FRAME_HAS_CONTAINER_LAYER);
} else {
NS_ASSERTION(f->GetStateBits() & NS_FRAME_HAS_CONTAINER_LAYER,
"This bit should have been set by BuildContainerLayerFor");
} }
// Reset the invalid region now so we can start collecting new dirty // Reset the invalid region now so we can start collecting new dirty
@ -1225,8 +1222,7 @@ FrameLayerBuilder::BuildContainerLayerFor(nsDisplayListBuilder* aBuilder,
state.Finish(); state.Finish();
containerLayer->SetIsOpaqueContent(aChildren.IsOpaque()); containerLayer->SetIsOpaqueContent(aChildren.IsOpaque());
nsRefPtr<Layer> layer = containerLayer.forget(); return containerLayer.forget();
return layer.forget();
} }
Layer* Layer*

Просмотреть файл

@ -269,8 +269,7 @@ nsHTMLCanvasFrame::BuildLayer(nsDisplayListBuilder* aBuilder,
layer->SetTransform(gfx3DMatrix::From2D(transform)); layer->SetTransform(gfx3DMatrix::From2D(transform));
layer->SetFilter(nsLayoutUtils::GetGraphicsFilterForFrame(this)); layer->SetFilter(nsLayoutUtils::GetGraphicsFilterForFrame(this));
nsRefPtr<Layer> result = layer.forget(); return layer.forget();
return result.forget();
} }
NS_IMETHODIMP NS_IMETHODIMP