Bug 584841 patch 10: Give imgStatusTracker an Image* instead of imgIContainer*. r=bholley a=blocking

This commit is contained in:
Daniel Holbert 2010-08-13 21:09:49 -07:00
Родитель 67428f776b
Коммит 23797c95ad
2 изменённых файлов: 13 добавлений и 5 удалений

Просмотреть файл

@ -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<imgIContainer> mImage;
nsRefPtr<Image> mImage;
nsRefPtr<imgRequestProxy> mProxy;
};

Просмотреть файл

@ -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<nsIRunnable> 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;