Bug 781892 - Clear mImageQueue when setIdle or shuting down. r=cjones
authorKan-Ru Chen (陳侃如) <kanru@kanru.info>
Wed, 29 Aug 2012 03:52:35 -0300
changeset 110039 febcaf392a68542cc9790a2ae35129f281fa925c
parent 110038 ff45232365137efd148d881b86635582f24616d8
child 110040 d405d013746d5c16d288228e83e9545b10282f2c
push id1708
push userakeybl@mozilla.com
push dateMon, 19 Nov 2012 21:10:21 +0000
treeherdermozilla-beta@27b14fe50103 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscjones
bugs781892
milestone18.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 781892 - Clear mImageQueue when setIdle or shuting down. r=cjones
gfx/layers/ipc/ImageContainerChild.cpp
--- a/gfx/layers/ipc/ImageContainerChild.cpp
+++ b/gfx/layers/ipc/ImageContainerChild.cpp
@@ -61,16 +61,17 @@ void ImageContainerChild::DispatchStop()
 }
 
 void ImageContainerChild::SetIdleNow() 
 {
   if (mStop) return;
 
   SendFlush();
   ClearSharedImagePool();
+  mImageQueue.Clear();
 }
 
 void ImageContainerChild::DispatchSetIdle()
 {
   if (mStop) return;
 
   GetMessageLoop()->PostTask(FROM_HERE, 
                     NewRunnableMethod(this, &ImageContainerChild::SetIdleNow));
@@ -370,16 +371,17 @@ void ImageContainerChild::SendImageAsync
 void ImageContainerChild::DestroyNow()
 {
   NS_ABORT_IF_FALSE(InImageBridgeChildThread(),
                     "Should be in ImageBridgeChild thread.");
   NS_ABORT_IF_FALSE(mDispatchedDestroy,
                     "Incorrect state in the destruction sequence.");
 
   ClearSharedImagePool();
+  mImageQueue.Clear();
 
   // will decrease the refcount and, in most cases, delete the ImageContainerChild
   Send__delete__(this);
   Release(); // corresponds to the AddRef in DispatchDestroy
 }
 
 void ImageContainerChild::DispatchDestroy()
 {