[MLK] Leaking nsJISx4501LineBreaker

VERIFIED FIXED in M12

Status

()

Core
RDF
P3
normal
VERIFIED FIXED
19 years ago
18 years ago

People

(Reporter: Patrick C. Beard, Assigned: Frank Tang)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

19 years ago
When using an nsCOMPtr<nsILineBreaker>, simply assigning to it causes another
AddRef() to be called on the interface being assigned. However, the line above
returns an object which already has a refCount of 1, so the object leaks. The fix
is as follows:

Index: mozilla/rdf/content/src/nsXULDocument.cpp
===================================================================
RCS file: /cvsroot/mozilla/rdf/content/src/nsXULDocument.cpp,v
retrieving revision 1.204
diff -r1.204 nsXULDocument.cpp
722c722
<          mLineBreaker = lb;
---
>          mLineBreaker = dont_AddRef(lb);
(Assignee)

Updated

19 years ago
Target Milestone: M12
(Assignee)

Comment 1

19 years ago
same for word breaker
I copy the code from layout/base/src/nsDocument.cpp . howerver, in there, the pointer is not nsCOMPtr so we should only fix
this place.
(Assignee)

Updated

19 years ago
Status: NEW → ASSIGNED
(Assignee)

Updated

19 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 19 years ago
Resolution: --- → FIXED
(Assignee)

Comment 2

19 years ago
fix and check in.

Comment 3

18 years ago
verified
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.