Bug 636114 - Crash [@ PluginBackgroundSink::~PluginBackgroundSink() ]; r=jones.chris.g approval2.0=johnath

This commit is contained in:
ext:(%20roc%40ocallahan.org) 2011-03-01 08:54:37 -04:00
Родитель e0d77057cd
Коммит 1e9389b69d
1 изменённых файлов: 7 добавлений и 2 удалений

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

@ -2140,10 +2140,15 @@ nsObjectFrame::BuildLayer(nsDisplayListBuilder* aBuilder,
// This will destroy any old background sink and notify us that the
// background is now unknown
readback->SetSink(nsnull);
NS_ASSERTION(!mBackgroundSink, "Should have been cleared");
readback->SetSize(nsIntSize(size.width, size.height));
if (mBackgroundSink) {
// Maybe we still have a background sink associated with another
// readback layer that wasn't recycled for some reason? Unhook it
// now so that if this frame goes away, it doesn't have a dangling
// reference to us.
mBackgroundSink->Destroy();
}
mBackgroundSink =
new PluginBackgroundSink(this,
readback->AllocateSequenceNumber());