Bug 912040 - Make sure deallocating shared texture data doesn't race with TextureClient access. r=sotaro

This commit is contained in:
Nicolas Silva
2013-09-06 11:04:50 +02:00
parent 120aac0ec2
commit 2f4d470a32
7 changed files with 36 additions and 1 deletions

View File

@@ -34,6 +34,7 @@ SharedTextureClientOGL::~SharedTextureClientOGL()
bool
SharedTextureClientOGL::ToSurfaceDescriptor(SurfaceDescriptor& aOutDescriptor)
{
MOZ_ASSERT(IsValid());
if (!IsAllocated()) {
return false;
}
@@ -48,6 +49,7 @@ SharedTextureClientOGL::InitWith(gl::SharedTextureHandle aHandle,
gl::SharedTextureShareType aShareType,
bool aInverted)
{
MOZ_ASSERT(IsValid());
MOZ_ASSERT(!IsAllocated());
mHandle = aHandle;
mSize = aSize;