Bug 897452 - Part 8 - fix TextureParent::ActorDestroy - r=nical

This commit is contained in:
Benoit Jacob 2013-12-11 13:05:23 -05:00
parent 592aa8d811
commit 45e7e3ac91

View File

@ -675,21 +675,23 @@ TextureParent::RecvRemoveTextureSync()
void
TextureParent::ActorDestroy(ActorDestroyReason why)
{
if (!mTextureHost) {
return;
}
switch (why) {
case AncestorDeletion:
NS_WARNING("PTexture deleted after ancestor");
// fall-through to deletion path
case Deletion:
if (mTextureHost && mTextureHost->GetFlags() & !TEXTURE_DEALLOCATE_CLIENT) {
if (!(mTextureHost->GetFlags() & TEXTURE_DEALLOCATE_CLIENT)) {
mTextureHost->DeallocateSharedData();
}
break;
case NormalShutdown:
case AbnormalShutdown:
if (mTextureHost) {
mTextureHost->OnActorDestroy();
}
mTextureHost->OnActorDestroy();
break;
case FailedConstructor: