From b610b33b733088753f8da8a0a2e8eee79296f650 Mon Sep 17 00:00:00 2001 From: Joe Drew Date: Wed, 3 Oct 2012 16:31:28 -0400 Subject: [PATCH] Back out 134f5b1d6d50 for leaking at shutdown on a CLOSED TREE --- image/src/RasterImage.cpp | 13 ++----------- image/src/RasterImage.h | 1 - 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/image/src/RasterImage.cpp b/image/src/RasterImage.cpp index 31a93d3b2a4..f62233d7db5 100644 --- a/image/src/RasterImage.cpp +++ b/image/src/RasterImage.cpp @@ -234,8 +234,8 @@ RasterImage::RasterImage(imgStatusTracker* aStatusTracker) : mInDecoder(false), mAnimationFinished(false), mFinishing(false), - mInUpdateImageContainer(false), - mScaleRequest(this) + mScaleRequest(this), + mInUpdateImageContainer(false) { // Set up the discard tracker node. mDiscardTrackerNode.img = this; @@ -2714,10 +2714,6 @@ RasterImage::ScaleWorker::RequestScale(RasterImage* aImg) if (request->isInList()) return; - // While the request is outstanding, we hold a reference to it so it won't be - // deleted from under us (and, since it owns us, so we won't be deleted). - request->kungFuDeathGrip = request->image; - mScaleRequests.insertBack(request); if (!sScaleWorkerThread) { @@ -2762,11 +2758,6 @@ RasterImage::DrawWorker::Run() nsIntRect frameRect = request->srcFrame->GetRect(); observer->FrameChanged(nullptr, request->image, &frameRect); } - if (request->done) { - // We are now done with this image, so we can release our reference. - // THIS CAN DELETE THE REQUEST! - request->kungFuDeathGrip = nullptr; - } } return NS_OK; diff --git a/image/src/RasterImage.h b/image/src/RasterImage.h index 891f888b722..0d2c7dece6d 100644 --- a/image/src/RasterImage.h +++ b/image/src/RasterImage.h @@ -511,7 +511,6 @@ private: static void Stop(RasterImage* aImg); RasterImage* const image; - nsRefPtr kungFuDeathGrip; imgFrame *srcFrame; nsAutoPtr dstFrame; gfxSize scale;