Bug 844403 - Make VectorImage cancel all listeners when destroyed. r=dholbert

This commit is contained in:
Seth Fowler 2013-02-25 17:40:13 -08:00
parent 241ea91aef
commit bfbd6dcfd3

View File

@ -302,6 +302,7 @@ VectorImage::VectorImage(imgStatusTracker* aStatusTracker,
VectorImage::~VectorImage()
{
CancelAllListeners();
}
//------------------------------------------------------------------------------
@ -899,9 +900,6 @@ VectorImage::OnSVGDocumentParsed()
void
VectorImage::CancelAllListeners()
{
NS_ABORT_IF_FALSE(mParseCompleteListener, "Should have the parse complete listener");
NS_ABORT_IF_FALSE(mLoadEventListener, "Should have the load event listener");
if (mParseCompleteListener) {
mParseCompleteListener->Cancel();
mParseCompleteListener = nullptr;