Bug 782971 - Fix crash resulting from not initializing an argument in ShadowThebesLayerOGL::Swap(). r=cjones
authorJustin Lebar <justin.lebar@gmail.com>
Wed, 15 Aug 2012 14:36:44 -0400
changeset 102456 4db58ba7848f9d74bfea774df7712026987292b3
parent 102455 194bf5cfd25fec90357d98422041b03d4a0fa3d2
child 102457 340f7af0fb8e7f4f17c916b1337c3e46223795d6
push id13469
push userjlebar@mozilla.com
push dateWed, 15 Aug 2012 18:36:58 +0000
treeherdermozilla-inbound@4db58ba7848f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscjones
bugs782971
milestone17.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 782971 - Fix crash resulting from not initializing an argument in ShadowThebesLayerOGL::Swap(). r=cjones
gfx/layers/opengl/ThebesLayerOGL.cpp
--- a/gfx/layers/opengl/ThebesLayerOGL.cpp
+++ b/gfx/layers/opengl/ThebesLayerOGL.cpp
@@ -999,16 +999,17 @@ ShadowThebesLayerOGL::Swap(const ThebesB
                            nsIntRegion* aNewBackValidRegion,
                            OptionalThebesBuffer* aReadOnlyFront,
                            nsIntRegion* aFrontUpdatedRegion)
 {
   if (mDestroyed) {
     // Don't drop buffers on the floor.
     *aNewBack = aNewFront;
     *aNewBackValidRegion = aNewFront.rect();
+    *aReadOnlyFront = null_t();
     return;
   }
 
   if (IsSurfaceDescriptorValid(mBufferDescriptor)) {
     AutoOpenSurface currentFront(OPEN_READ_ONLY, mBufferDescriptor);
     AutoOpenSurface newFront(OPEN_READ_ONLY, aNewFront.buffer());
     if (currentFront.Size() != newFront.Size()) {
       // The buffer changed size making the current front buffer