Bug 945632. Assert we've released memory which the host should have released. r=nical
authorNicholas Cameron <ncameron@mozilla.com>
Wed, 04 Dec 2013 22:03:29 -0500
changeset 159642 5204feef4698f12f5161a72a88fb1a2fd068811c
parent 159641 8f91db306f33badfd4a7aaa9fc5edc1e2341b879
child 159643 96fd6d7d2f8c38379ebd964fbd9c35f076a3909f
push id25808
push usercbook@mozilla.com
push dateTue, 10 Dec 2013 12:03:31 +0000
treeherdermozilla-central@7fb91a422c5e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnical
bugs945632
milestone29.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've released memory which the host should have released. r=nical
gfx/layers/composite/TextureHost.cpp
--- a/gfx/layers/composite/TextureHost.cpp
+++ b/gfx/layers/composite/TextureHost.cpp
@@ -544,16 +544,18 @@ MemoryTextureHost::MemoryTextureHost(uin
 , mBuffer(aBuffer)
 {
   MOZ_COUNT_CTOR(MemoryTextureHost);
 }
 
 MemoryTextureHost::~MemoryTextureHost()
 {
   DeallocateDeviceData();
+  NS_ASSERTION(!mBuffer || (mFlags & TEXTURE_DEALLOCATE_CLIENT),
+               "Leaking our buffer");
   MOZ_COUNT_DTOR(MemoryTextureHost);
 }
 
 void
 MemoryTextureHost::DeallocateSharedData()
 {
   if (mBuffer) {
     GfxMemoryImageReporter::WillFree(mBuffer);