Bug 1242778: Add MOZ_COUNT_CTOR & MOZ_COUNT_DTOR calls to track leaks of imagelib's FrameAnimator class. r=tn

Also add crashtest with a corrupt animated PNG image that causes a leak to be reported (thanks to these MOZ_COUNT calls). This leak is fixed by the patch on separate bug 1237709.
This commit is contained in:
Daniel Holbert 2016-01-26 11:08:26 -08:00
parent 52c914f25f
commit 11c746cfa3
3 changed files with 9 additions and 1 deletions

View File

@ -36,7 +36,14 @@ public:
, mFirstFrameTimeout(0)
, mAnimationMode(aAnimationMode)
, mDoneDecoding(false)
{ }
{
MOZ_COUNT_CTOR(FrameAnimator);
}
~FrameAnimator()
{
MOZ_COUNT_DTOR(FrameAnimator);
}
/**
* Return value from RequestRefresh. Tells callers what happened in that call

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View File

@ -15,6 +15,7 @@ skip-if(B2G) load 944353.jpg
load 1205923-1.html
load 1212954-1.svg
load 1235605.gif
load 1242778-1.png
load colormap-range.gif
HTTP load delayedframe.sjs # A 3-frame animated GIF with an inordinate delay between the second and third frame