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

This commit is contained in:
Benoit Jacob 2013-12-11 20:44:57 -05:00
parent c590710a23
commit 0d718a571c

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: