Release image loader during delete frame to break so that images shutdown properly

This commit is contained in:
kipp 1998-05-12 01:32:30 +00:00
Родитель e8cd7381c4
Коммит c0cb1cb79c
1 изменённых файлов: 9 добавлений и 0 удалений

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

@ -48,6 +48,8 @@ class ImageFrame : public nsLeafFrame {
public:
ImageFrame(nsIContent* aContent, nsIFrame* aParentFrame);
NS_IMETHOD DeleteFrame();
NS_IMETHOD Paint(nsIPresContext& aPresContext,
nsIRenderingContext& aRenderingContext,
const nsRect& aDirtyRect);
@ -133,7 +135,14 @@ ImageFrame::ImageFrame(nsIContent* aContent, nsIFrame* aParentFrame)
ImageFrame::~ImageFrame()
{
}
NS_METHOD
ImageFrame::DeleteFrame()
{
// Release image loader first so that it's refcnt can go to zero
NS_IF_RELEASE(mImageLoader);
return nsLeafFrame::DeleteFrame();
}
void