Closed Bug 888053 Opened 11 years ago Closed 11 years ago

Under certain conditions the top sites thumbnails leak database cursors

Categories

(Firefox for Android Graveyard :: Awesomescreen, defect)

ARM
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 25

People

(Reporter: ckitching, Assigned: ckitching)

References

Details

Attachments

(1 file, 1 obsolete file)

Starting with an Awesomescreen with one or more gaps in the top sites display (That is, you have not yet visited enough sites for Fennec to have images to display in all the slots), tap on such a slot to add a site there. If you select a site for which a thumbnail is not available, the database Cursor goes out of scope without having close() called on it, creating a memory leak. The culprit seems to be an if statement in TopSitesView, around line 650, which causes the function to return early without closing the Cursor.
The fix!
Assignee: nobody → ckitching
Attachment #768615 - Flags: review?(bnicholson)
Comment on attachment 768615 [details] [diff] [review] Fix for the Cursor leak described Review of attachment 768615 [details] [diff] [review]: ----------------------------------------------------------------- Nice find! ::: mobile/android/base/widget/TopSitesView.java @@ +662,5 @@ > + bitmap = BitmapUtils.decodeByteArray(b); > + } > + } > + } finally { > + if(c != null) { Nit: space before "("
Attachment #768615 - Flags: review?(bnicholson) → review+
Nit-picked.
Attachment #768615 - Attachment is obsolete: true
Attachment #769769 - Attachment description: Fix for the described cursor leak, plus fix for style nit. → Bug 888053 - Fix cursor leak in TopSitesView r=bnicholson
Attachment #769769 - Flags: review?(bnicholson)
Attachment #769769 - Flags: review?(bnicholson) → review+
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 25
Bug 760384 which depends on this bug is tracked for 23.0.
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: