b=807925 revert to calling GetImageContainer() before NotifyPaintWaiter() to check for null instance first r=roc

--HG--
extra : transplant_source : %FF%24%B7%29%DB%F7%88%F4%60%AEg-%26%EF%1Bd%A6%FF8%0E
This commit is contained in:
Karl Tomlinson 2012-11-08 10:15:27 +13:00
parent 1bb80cfab8
commit 01bff252cf

View File

@ -1611,6 +1611,13 @@ nsObjectFrame::BuildLayer(nsDisplayListBuilder* aBuilder,
(aManager->GetLayerBuilder()->GetLeafLayerFor(aBuilder, aItem));
if (aItem->GetType() == nsDisplayItem::TYPE_PLUGIN) {
// Create image
nsRefPtr<ImageContainer> container = mInstanceOwner->GetImageContainer();
if (!container) {
// This can occur if our instance is gone.
return nullptr;
}
if (!layer) {
mInstanceOwner->NotifyPaintWaiter(aBuilder);
// Initialize ImageLayer
@ -1619,13 +1626,6 @@ nsObjectFrame::BuildLayer(nsDisplayListBuilder* aBuilder,
return nullptr;
}
// Create image
nsRefPtr<ImageContainer> container = mInstanceOwner->GetImageContainer();
if (!container) {
// This can occur if our instance is gone.
return nullptr;
}
NS_ASSERTION(layer->GetType() == Layer::TYPE_IMAGE, "Bad layer type");
ImageLayer* imglayer = static_cast<ImageLayer*>(layer.get());
UpdateImageLayer(r);