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 173508 8b33af450fc6da8f3af2a0c699fed855228bfef6
parent 173507 6b5f8c6d9f3ba9e5c3380f9611384ad9b17da840
child 173509 4e3e0b24a123a0fe4d504eb8cf246a0487759b52
push id3224
push userlsblakk@mozilla.com
push dateTue, 04 Feb 2014 01:06:49 +0000
treeherdermozilla-beta@60c04d0987f1 [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);