Closed Bug 418791 Opened 13 years ago Closed 13 years ago

Don't try to discard image data when the image is animating

Categories

(Core :: ImageLib, defect, P2)

defect

Tracking

()

VERIFIED FIXED
mozilla1.9beta5

People

(Reporter: alfredkayser, Assigned: alfredkayser)

References

Details

(Keywords: crash, perf)

Attachments

(1 file)

The 'Discard image' function of imgContainer creates a timer (with 45 seconds delay) to discard image data. However, when the image is animating, this timer is cancelled and re-created for every frame that is accessed in the animation.
This is probably the cause of the crash of bug 399925.

A simple solution is to not set the timer when the image is animating (as the discard will never happen). This prevents needless creation and cancellations of the timer, and saves CPU and memory.

A more drastic solution is not to save the discard data for such images, but that is something for another bug.
Flags: blocking1.9?
Attachment #304682 - Flags: review?(pavlov)
Blocks: 399925
Assignee: nobody → alfredkayser
Version: unspecified → Trunk
Marking P2 for now, stuart please change priority based on review -- this might need to be P1 if there could be regressions from the change.
Flags: blocking1.9? → blocking1.9+
Priority: -- → P2
Flags: tracking1.9+ → blocking1.9+
Attachment #304682 - Flags: review?(pavlov) → review+
Checking in modules/libpr0n/src/imgContainer.cpp;
/cvsroot/mozilla/modules/libpr0n/src/imgContainer.cpp,v  <--  imgContainer.cpp
new revision: 1.67; previous revision: 1.66
done
Status: NEW → RESOLVED
Closed: 13 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9beta5
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.