Closed
Bug 802491
Opened 13 years ago
Closed 13 years ago
ScrollbarLayer's direct-allocation buffers get leaked
Categories
(Firefox for Android Graveyard :: Toolbar, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 19
People
(Reporter: kats, Assigned: kats)
References
Details
Attachments
(1 file)
2.06 KB,
patch
|
cwiiis
:
review+
|
Details | Diff | Splinter Review |
Found this while testing pushkar's patch for bug 779511. The BufferedCairoImage class doesn't accept ownership of the direct-allocation buffer passed in during construction or via the setBuffer call (i.e. it doesn't set the mNeedToFreeBuffer boolean and therefore doesn't free the buffer). However, all users of BufferedCairoImage assume that it takes ownership of the buffer, and so they don't free it either! Therefore the buffer gets leaked. Thankfully this only affects the ScrollbarLayer instances by default since TextLayer is never instantiated unless the frame rate pref is enabled, and PluginLayer passes in a null buffer.
Attached patch basically makes BufferedCairoImage always accept ownership of the buffer, which removes the guesswork from the caller code and makes it behave consistently (from one point of view at least).
Attachment #672184 -
Flags: review?(chrislord.net)
Comment 1•13 years ago
|
||
Comment on attachment 672184 [details] [diff] [review]
Patch
Review of attachment 672184 [details] [diff] [review]:
-----------------------------------------------------------------
Looks good to me, I assume that all users of this class have been checked.
Attachment #672184 -
Flags: review?(chrislord.net) → review+
Assignee | ||
Comment 2•13 years ago
|
||
Assignee | ||
Comment 3•13 years ago
|
||
For future reference, I had pushed this to try along with the patch from bug 802495, try run is at https://tbpl.mozilla.org/?tree=Try&rev=766f2d373c6c
Comment 4•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Target Milestone: --- → Firefox 19
Updated•4 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•