Closed
Bug 20181
Opened 25 years ago
Closed 25 years ago
[MLK] Leaking nsJISx4501LineBreaker
Categories
(Core Graveyard :: RDF, defect, P3)
Core Graveyard
RDF
Tracking
(Not tracked)
VERIFIED
FIXED
M12
People
(Reporter: beard, Assigned: ftang)
References
()
Details
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•25 years ago
|
Target Milestone: M12
Assignee | ||
Comment 1•25 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•25 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Updated•25 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 2•25 years ago
|
||
fix and check in.
Updated•7 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•