Closed Bug 252731 Opened 20 years ago Closed 20 years ago

Fix memory leaks in accessible/src/atk/nsAccessibleHyperText.cpp

Categories

(Core :: Disability Access APIs, defect)

defect
Not set
critical

Tracking

()

RESOLVED FIXED

People

(Reporter: jwatt, Assigned: jwatt)

Details

(Keywords: fixed-aviary1.0, fixed1.7.5, memory-leak)

Attachments

(2 files, 3 obsolete files)

Both do_QueryInterface() and ElementAt() call AddRef() - see:
http://lxr.mozilla.org/mozilla/source/xpcom/ds/nsSupportsArray.cpp#323
Attached patch patch (obsolete) — Splinter Review
Attachment #154065 - Flags: superreview?(bzbarsky)
Attachment #154065 - Flags: review?(bzbarsky)
fyi, you can use do_QueryElementAt here, and keep the syntactic sugar of do_QI.
just s/do_QueryInterface/do_QueryElementAt/ and you're good to go ;)

http://lxr.mozilla.org/mozilla/source/xpcom/ds/nsICollection.idl#87
er, more like this.

s/do_QueryInterface(mTextChildren->ElementAt(index))/do_QueryElementAt(mTextChildren,
index))/

Attached patch patch dwitte's way (obsolete) — Splinter Review
Interesting, thanks dwitte. I haven't checked that this patch builds okay.
Attachment #154065 - Flags: superreview?(bzbarsky)
Attachment #154065 - Flags: review?(bzbarsky)
Comment on attachment 154074 [details] [diff] [review]
patch dwitte's way

This is fine in general (and I should have recalled do_QueryElementAt), but
please follow the file's style for whitespace around the do_QIAt (that is, no
spaces there) and please don't make random whitespace changes...
Attachment #154074 - Flags: superreview+
Attachment #154074 - Flags: review+
Attached patch updated patch (obsolete) — Splinter Review
Patch corrected to follow style of the file. Those whitespace changes aren't
random btw, I removed trailing whitespace from the ends of all lines to tidy
the file. Unless you really object to that I'd prefer it gets tidied.
I'd rather not just assume that you're happy with the updated patch bz, can you
add a quick comment to let me know. 
I realize what the whitespace changes were, but they're random in that they are
unrelated to this bug.  And yes, I really object to them -- they make CVS blame
more confusing for little benefit...
Attached patch final patchSplinter Review
(In reply to comment #8)
> I realize what the whitespace changes were, but they're random in that they
are
> unrelated to this bug.  And yes, I really object to them -- they make CVS
blame
> more confusing for little benefit...

I didn't realise that.
Attachment #154065 - Attachment is obsolete: true
Attachment #154074 - Attachment is obsolete: true
Attachment #154078 - Attachment is obsolete: true
Comment on attachment 154117 [details] [diff] [review]
final patch

r+sr=bzbarsky.

Want me to check this in?
Attachment #154117 - Flags: superreview+
Attachment #154117 - Flags: review+
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
It is a fixed memory leak bug, could it be considered for 1.7.2 ?
Flags: blocking1.7.2?
Keywords: mlk
Comment on attachment 154117 [details] [diff] [review]
final patch

Marking for approval, sorry I didn't do this before 1.7.2.
Attachment #154117 - Flags: approval1.7.3?
Attachment #154117 - Flags: approval-aviary?
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Approver: I'm away until September, but please still review - bz will check this
into the branch if he catches the bugmail. 
Comment on attachment 154117 [details] [diff] [review]
final patch

a=mkaply for aviary and 1.7.3
Attachment #154117 - Flags: approval1.7.3?
Attachment #154117 - Flags: approval1.7.3+
Attachment #154117 - Flags: approval-aviary?
Attachment #154117 - Flags: approval-aviary+
Branch is closed, but this is the patch that should go in once it opens.
Marking fixed, since it's fixed on trunk.
Status: REOPENED → RESOLVED
Closed: 20 years ago20 years ago
Keywords: fixed-aviary1.0
Resolution: --- → FIXED
Keywords: fixed1.7.3
Flags: blocking1.7.3?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: