The previous patch wasn't good enough because it only prevented dispatching more setTimeouts after finish. It did nothing to stop already dispatched setTimeouts from calling ok(true,...).
We can have multiple setTimeouts from multiple frame update notifications in flight at the same time. If one of them reaches the finishing conditions the rest will too. So just guard calling finish with a global bool.
We can have multiple setTimeouts from multiple frame update notifications in flight at the same time. If one of them reaches the finishing conditions the rest will too. So just guard calling finish with a global bool.
Image notifications sent from nsImageLoadingContent happen under a scriptblocker. drawWindow flushes will paint observers, which can dispatch events. Events dispatched while scripts are blocked assert.
The test does nothing if the animated images discarding pref isn't enabled.
--HG--
rename : image/test/crashtests/1249576-1.png => image/test/mochitest/infinite-apng.png