Bug 945632. Assert we don't leak on the host side. r=nical
☠☠ backed out by 8ee4f2722437 ☠ ☠
authorNicholas Cameron <ncameron@mozilla.com>
Thu, 05 Dec 2013 14:21:15 +1300
changeset 174482 8b33af450fc6da8f3af2a0c699fed855228bfef6
parent 174481 6b5f8c6d9f3ba9e5c3380f9611384ad9b17da840
child 174483 4e3e0b24a123a0fe4d504eb8cf246a0487759b52
push id445
push userffxbld
push dateMon, 10 Mar 2014 22:05:19 +0000
treeherdermozilla-release@dc38b741b04e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnical
bugs945632
milestone28.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 945632. Assert we don't leak on the host side. r=nical
gfx/layers/composite/TextureHost.cpp
--- a/gfx/layers/composite/TextureHost.cpp
+++ b/gfx/layers/composite/TextureHost.cpp
@@ -536,16 +536,18 @@ MemoryTextureHost::MemoryTextureHost(uin
 , mBuffer(aBuffer)
 {
   MOZ_COUNT_CTOR(MemoryTextureHost);
 }
 
 MemoryTextureHost::~MemoryTextureHost()
 {
   DeallocateDeviceData();
+  NS_ASSERTION(!mBuffer || GetFlags() & TEXTURE_DEALLOCATE_CLIENT,
+               "Leaking our buffer");
   MOZ_COUNT_DTOR(MemoryTextureHost);
 }
 
 void
 MemoryTextureHost::DeallocateSharedData()
 {
   if (mBuffer) {
     GfxMemoryImageReporter::WillFree(mBuffer);