From ef8705a2a757ec398c8333c69c8a0d0c287a4a14 Mon Sep 17 00:00:00 2001 From: Jonathan Watt Date: Fri, 7 Mar 2014 13:21:46 +0000 Subject: [PATCH] Bug 980428 - Add a DEBUG-only DataSourceSurface dtor to assert that the surface has not been left mapped. r=Bas --- gfx/2d/2D.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gfx/2d/2D.h b/gfx/2d/2D.h index 0db291fac88..6f509999cea 100644 --- a/gfx/2d/2D.h +++ b/gfx/2d/2D.h @@ -347,6 +347,13 @@ public: { } +#ifdef DEBUG + virtual ~DataSourceSurface() + { + MOZ_ASSERT(!mIsMapped, "Someone forgot to call Unmap()"); + } +#endif + struct MappedSurface { uint8_t *mData; int32_t mStride;