Closed Bug 753334 Opened 12 years ago Closed 12 years ago

Audit code that deals with java.nio.Buffer

Categories

(Firefox for Android Graveyard :: General, defect)

All
Android
defect
Not set
normal

Tracking

(firefox14 wontfix, firefox15 fixed)

RESOLVED FIXED
Firefox 15
Tracking Status
firefox14 --- wontfix
firefox15 --- fixed

People

(Reporter: kats, Assigned: kats)

Details

Attachments

(1 file)

Attached patch PatchSplinter Review
We might be leaking buffers somewhere, see bug 751343 and bug 750965. I audited the relevant code and found some possible double-frees (ScrollbarLayer.finalize(), TextLayer.finalize()) and possible leaks (BufferedCairoImage.setBuffer).
Attachment #622372 - Flags: review?(chrislord.net)
Comment on attachment 622372 [details] [diff] [review]
Patch

Review of attachment 622372 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good to me.

::: mobile/android/base/gfx/TileLayer.java
@@ -198,5 @@
> -
> -            GLES20.glTexImage2D(GLES20.GL_TEXTURE_2D, 0, glInfo.internalFormat, mSize.width,
> -                                mSize.height, 0, glInfo.format, glInfo.type, tempBuffer);
> -            GeckoAppShell.freeDirectBuffer(tempBuffer);
> -            */

Unrelated removal, but ok :)
Attachment #622372 - Flags: review?(chrislord.net) → review+
(In reply to Chris Lord [:cwiiis] from comment #1)
> 
> Unrelated removal, but ok :)

Showed up in my grepping for buffer-related code :)

Also, sewardj ran valgrind on fennec with this patch applied, and found no real difference in behaviour. He did see a crash on shutdown but turns out that was pre-existing; it is tracked by bug 753665.

Although it seems like this patch doesn't actually fix the memory leak valgrind was possibly finding, it seems like an improvement in the code so I landed it on inbound anyway.

https://hg.mozilla.org/integration/mozilla-inbound/rev/1259212fa0f7
Target Milestone: --- → Firefox 15
https://hg.mozilla.org/mozilla-central/rev/1259212fa0f7
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Marking this as wontfix for 14 because I'm not convinced it actually helped anything, and without being convinced of that it's not worth the risk.
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: