Bug 1016677 - Add pointer check to ContentClientRemoteBuffer::DestroyBuffers() r=nical
authorSotaro Ikeda <sikeda@mozilla.com>
Wed, 04 Jun 2014 10:45:00 -0700
changeset 206958 31bc555dbc9e38cf96edd7b156fb174ec9f091c3
parent 206957 8ee52188963cbc3a1d948a41ad14d4f71ad17487
child 206959 a82637fc77c9cab4bbef29c1e924e913874a3a37
push id494
push userraliiev@mozilla.com
push dateMon, 25 Aug 2014 18:42:16 +0000
treeherdermozilla-release@a3cc3e46b571 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnical
bugs1016677
milestone32.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 1016677 - Add pointer check to ContentClientRemoteBuffer::DestroyBuffers() r=nical
gfx/layers/client/ContentClient.cpp
--- a/gfx/layers/client/ContentClient.cpp
+++ b/gfx/layers/client/ContentClient.cpp
@@ -342,20 +342,21 @@ void
 ContentClientRemoteBuffer::SwapBuffers(const nsIntRegion& aFrontUpdatedRegion)
 {
   mFrontAndBackBufferDiffer = true;
 }
 
 void
 ContentClientDoubleBuffered::DestroyFrontBuffer()
 {
-  MOZ_ASSERT(mFrontClient);
+  if (mFrontClient) {
+    mOldTextures.AppendElement(mFrontClient);
+    mFrontClient = nullptr;
+  }
 
-  mOldTextures.AppendElement(mFrontClient);
-  mFrontClient = nullptr;
   if (mFrontClientOnWhite) {
     mOldTextures.AppendElement(mFrontClientOnWhite);
     mFrontClientOnWhite = nullptr;
   }
 }
 
 void
 ContentClientDoubleBuffered::Updated(const nsIntRegion& aRegionToDraw,