nsJNIString is leaky with zero length strings.

RESOLVED FIXED

Status

()

Core
Widget: Android
RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: dougt, Assigned: dougt)

Tracking

unspecified
x86_64
Android
Points:
---

Firefox Tracking Flags

(fennec2.0+)

Details

Attachments

(1 attachment)

(Assignee)

Description

7 years ago
Created attachment 516070 [details] [diff] [review]
v.1

nsJNIString is leaky with zero length strings.
(Assignee)

Updated

7 years ago
Attachment #516070 - Attachment is patch: true
Attachment #516070 - Attachment mime type: application/octet-stream → text/plain
Attachment #516070 - Flags: review?(mwu)
(Assignee)

Updated

7 years ago
Duplicate of this bug: 636555
(Assignee)

Comment 2

7 years ago
dup blocked.  this blocks.
tracking-fennec: --- → 2.0+

Comment 3

7 years ago
Comment on attachment 516070 [details] [diff] [review]
v.1

Awesome. Just one nit.

>+    if (len <= 0) {
>+        SetIsVoid(PR_TRUE);
>+    }
>+    else {
>+        Assign(jCharPtr, len);
>+    }

The style in this file is to have else on the same line as the }.
Attachment #516070 - Flags: review?(mwu) → review+
(Assignee)

Comment 4

7 years ago
http://hg.mozilla.org/mozilla-central/rev/d02b25c4b1a8
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED

Updated

7 years ago
Duplicate of this bug: 637592

Comment 6

7 years ago
Yay! Should I dupe bug 629604 against this then? I think there's still some
value to dropping the nsJNIString type and just using a helper function to
properly stuff the bits into an nsString.

Updated

7 years ago
Assignee: nobody → doug.turner
You need to log in before you can comment on or make changes to this bug.