Closed Bug 1148684 Opened 9 years ago Closed 9 years ago

Compact SourceBuffer even if it contains only one chunk

Categories

(Firefox :: Downloads Panel, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 39
Tracking Status
firefox38 --- fixed
firefox39 --- fixed

People

(Reporter: seth, Assigned: seth)

References

Details

Attachments

(1 file)

Bug 1120271 introduced compacting support for SourceBuffer in ImageLib. Unfortunately, the code assumes that if there is only one chunk in the SourceBuffer, it doesn't need to be compacted. In cases where we got a false value for Content-Length, though, that's not true. Bug 1145762 is an example of such a situation.

The fix: we should always compact, even if we only have one chunk.
Here's the patch. I've verified that this fixes the issue in bug 1145762. (Even
without the GetContentLength fix in bug 1148682.)
Comment on attachment 8584933 [details] [diff] [review]
Compact SourceBuffer even if it contains only one chunk.

Oops, just realized I didn't request review on this.
Attachment #8584933 - Flags: review?(tnikkel)
Attachment #8584933 - Flags: review?(tnikkel) → review+
https://hg.mozilla.org/mozilla-central/rev/f64b5c0ee649
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 39
Comment on attachment 8584933 [details] [diff] [review]
Compact SourceBuffer even if it contains only one chunk.

Approval Request Comment
[Feature/regressing bug #]: Bug 1120271 introduced the bug. This fixes bug 1145762.
[User impact if declined]: Unnecessary memory consumption, resulting in OOM in some cases.
[Describe test coverage new/current, TreeHerder]: On m-c, and I believe now m-a.
[Risks and why]: Low risk.
[String/UUID change made/needed]: None.
Attachment #8584933 - Flags: approval-mozilla-beta?
Comment on attachment 8584933 [details] [diff] [review]
Compact SourceBuffer even if it contains only one chunk.

Regressions are unlikely, taking it.
should be in 38 beta 2
Attachment #8584933 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: