--- a/image/src/imgDecoderObserver.h+++ b/image/src/imgDecoderObserver.h@@ -28,21 +28,20 @@ struct nsIntRect; * relied upon. * * Decode notifications may or may not be synchronous, depending on the * situation. If imgIDecoder::FLAG_SYNC_DECODE is passed to a function that * triggers a decode, all notifications that can be generated from the currently * loaded data fire before the call returns. If FLAG_SYNC_DECODE is not passed, * all, some, or none of the notifications may fire before the call returns. */-class imgDecoderObserver : public mozilla::RefCounted<imgDecoderObserver>+class imgDecoderObserver { public:- MOZ_DECLARE_REFCOUNTED_TYPENAME(imgDecoderObserver)- virtual ~imgDecoderObserver() = 0;+ NS_INLINE_DECL_THREADSAFE_REFCOUNTING(imgDecoderObserver); /** * Load notification. * * called at the same time that nsIRequestObserver::onStartRequest would be * (used only for observers of imgIRequest objects, which are nsIRequests, * not imgIDecoder objects) */@@ -121,16 +120,19 @@ public: * Called when we are asked to Draw an image that is not locked. */ virtual void OnUnlockedDraw() = 0; /** * Called when an image is realized to be in error state. */ virtual void OnError() = 0;++protected:+ virtual ~imgDecoderObserver() = 0; }; // We must define a destructor because derived classes call our destructor from // theirs. Pure virtual destructors only requires that child classes implement // a virtual destructor, not that we can't have one too! inline imgDecoderObserver::~imgDecoderObserver() {}