The default bug view has changed. See this FAQ.

Compact SourceBuffer even if it contains only one chunk

RESOLVED FIXED in Firefox 38

Status

()

Firefox
Downloads Panel
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: seth, Assigned: seth)

Tracking

unspecified
Firefox 39
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox38 fixed, firefox39 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

2 years ago
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.
(Assignee)

Comment 1

2 years ago
Created attachment 8584933 [details] [diff] [review]
Compact SourceBuffer even if it contains only 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.)
(Assignee)

Comment 2

2 years ago
https://treeherder.mozilla.org/#/jobs?repo=try&revision=4fbc7048d9cc
(Assignee)

Comment 3

2 years ago
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+
(Assignee)

Comment 4

2 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/f64b5c0ee649
https://hg.mozilla.org/mozilla-central/rev/f64b5c0ee649
Status: NEW → RESOLVED
Last Resolved: 2 years ago
status-firefox39: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 39
(Assignee)

Comment 6

2 years ago
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?
status-firefox38: --- → affected
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+
https://hg.mozilla.org/releases/mozilla-beta/rev/ca8eaf3366e5
status-firefox38: affected → fixed
You need to log in before you can comment on or make changes to this bug.