Closed Bug 1185582 Opened 7 years ago Closed 7 years ago

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


(Core :: Layout: Images, Video, and HTML Frames, defect)

Not set



Tracking Status
firefox42 --- fixed


(Reporter: seth, Assigned: seth)




(1 file)

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.
Here's the patch. One less hack in the codebase.
Attachment #8636094 - Flags: review?(tnikkel)
Attachment #8636094 - Flags: review?(tnikkel) → review+
Thanks for the quick review!
This landed yesterday -
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
Product: Core → Core Graveyard
Product: Core Graveyard → Core
You need to log in before you can comment on or make changes to this bug.