From 23797c95ad6f58b62568b43088b832e6fb10acf1 Mon Sep 17 00:00:00 2001 From: Daniel Holbert Date: Fri, 13 Aug 2010 21:09:49 -0700 Subject: [PATCH] Bug 584841 patch 10: Give imgStatusTracker an Image* instead of imgIContainer*. r=bholley a=blocking --- modules/libpr0n/src/imgStatusTracker.cpp | 6 ++++-- modules/libpr0n/src/imgStatusTracker.h | 12 +++++++++--- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/modules/libpr0n/src/imgStatusTracker.cpp b/modules/libpr0n/src/imgStatusTracker.cpp index 43bb757829ef..c48ad0fa21fb 100644 --- a/modules/libpr0n/src/imgStatusTracker.cpp +++ b/modules/libpr0n/src/imgStatusTracker.cpp @@ -45,6 +45,8 @@ #include "Image.h" #include "ImageLogging.h" +using namespace mozilla::imagelib; + static nsresult GetResultFromImageStatus(PRUint32 aStatus) { @@ -55,7 +57,7 @@ GetResultFromImageStatus(PRUint32 aStatus) return NS_OK; } -imgStatusTracker::imgStatusTracker(imgIContainer* aImage) +imgStatusTracker::imgStatusTracker(Image* aImage) : mImage(aImage), mState(0), mImageStatus(imgIRequest::STATUS_NONE), @@ -170,7 +172,7 @@ class imgStatusNotifyRunnable : public nsRunnable imgStatusTracker mStatus; // We have to hold on to a reference to the tracker's image, just in case // it goes away while we're in the event queue. - nsRefPtr mImage; + nsRefPtr mImage; nsRefPtr mProxy; }; diff --git a/modules/libpr0n/src/imgStatusTracker.h b/modules/libpr0n/src/imgStatusTracker.h index 5a4923179c87..b7d50631acdd 100644 --- a/modules/libpr0n/src/imgStatusTracker.h +++ b/modules/libpr0n/src/imgStatusTracker.h @@ -46,6 +46,12 @@ class imgRequest; class imgRequestProxy; class imgStatusNotifyRunnable; class imgRequestNotifyRunnable; +namespace mozilla { +namespace imagelib { +class Image; +} // namespace imagelib +} // namespace mozilla + #include "nsCOMPtr.h" #include "nsIRunnable.h" @@ -78,7 +84,7 @@ public: // aImage is the image that this status tracker will pass to the // imgRequestProxys in SyncNotify() and EmulateRequestFinished(), and must be // alive as long as this instance is, because we hold a weak reference to it. - imgStatusTracker(imgIContainer* aImage); + imgStatusTracker(mozilla::imagelib::Image* aImage); imgStatusTracker(const imgStatusTracker& aOther); // Schedule an asynchronous "replaying" of all the notifications that would @@ -166,9 +172,9 @@ private: nsCOMPtr mRequestRunnable; - // A weak pointer to the imgIContainer, because the container owns us, and we + // A weak pointer to the Image, because it owns us, and we // can't create a cycle. - imgIContainer* mImage; + mozilla::imagelib::Image* mImage; PRUint32 mState; nsresult mImageStatus; PRPackedBool mHadLastPart;