Back out the hack to retry image decoding when memory is low, which is now useless

RESOLVED FIXED in Firefox 42



Layout: Images
3 years ago
3 years ago


(Reporter: seth, Assigned: seth)


Dependency tree / graph

Firefox Tracking Flags

(firefox42 fixed)



(1 attachment)



3 years ago
In bug 1171356 we landed a hack to retry decoding an image up to 10 times if memory was currently too low to allocate the image's first frame. There are two reasons why it no longer makes sense to keep this hack:

- This was motivated by the fact that we locked images during decoding, which meant that until the decoder got to the front of the decode queue and actually started running, the image's first frame would pointlessly consume image memory that could not be freed. This was fixed in bug 1117607 and bug 1176124; we no longer allocate an image's first frame until the decoder actually starts running.

- *Because* we no longer allocate an image's first frame until the decoder starts running, checking for decoder errors in RasterImage::CreateDecoder() to see if allocating the first frame of the image failed is now useless, because we don't allocate the first frame of the image at that point anymore.

Let's remove the code that landed in bug 1171356.

Comment 1

3 years ago
Created attachment 8636094 [details] [diff] [review]
Back out bug 1171356, a hack to retry image decoding which is now useless

Here's the patch. One less hack in the codebase.
Attachment #8636094 - Flags: review?(tnikkel)
Attachment #8636094 - Flags: review?(tnikkel) → review+

Comment 3

3 years ago
Thanks for the quick review!

Comment 4

3 years ago
This landed yesterday -
Last Resolved: 3 years ago
status-firefox42: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
You need to log in before you can comment on or make changes to this bug.