Closed
Bug 295145
Opened 20 years ago
Closed 19 years ago
nsUCSupport releases wrong pointer
Categories
(Core :: Internationalization, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: Biesinger, Assigned: mcsmurf)
References
()
Details
(Keywords: fixed1.8)
Attachments
(1 file, 1 obsolete file)
3.10 KB,
patch
|
jshin1987
:
review+
dbaron
:
superreview+
dbaron
:
approval1.8b4+
|
Details | Diff | Splinter Review |
569 NS_IMETHODIMP nsEncoderSupport::SetOutputErrorBehavior( 570 PRInt32 aBehavior, 571 nsIUnicharEncoder * aEncoder, 572 PRUnichar aChar) [...] 577 NS_IF_RELEASE(aEncoder); 578 mErrEncoder = aEncoder; 579 NS_IF_ADDREF(aEncoder); the release should probably refer to mErrEncoder.
Reporter | ||
Comment 1•20 years ago
|
||
and it looks like other implementations of this functions get this wrong as well...
Comment 2•19 years ago
|
||
Biesi, is this code not used or something? How come it't not crashing later when using mErrEncoder?
Assignee | ||
Comment 4•19 years ago
|
||
Assignee | ||
Updated•19 years ago
|
Attachment #190855 -
Attachment is obsolete: true
Assignee | ||
Comment 5•19 years ago
|
||
Assignee | ||
Updated•19 years ago
|
Attachment #190856 -
Flags: superreview?(jshin1987)
Attachment #190856 -
Flags: review?(jshin1987)
Comment 6•19 years ago
|
||
Comment on attachment 190856 [details] [diff] [review] Patch r=jshin
Attachment #190856 -
Flags: superreview?(jshin1987)
Attachment #190856 -
Flags: superreview?(dbaron)
Attachment #190856 -
Flags: review?(jshin1987)
Attachment #190856 -
Flags: review+
Attachment #190856 -
Flags: superreview?(dbaron) → superreview+
Reporter | ||
Comment 7•19 years ago
|
||
Comment on attachment 190856 [details] [diff] [review] Patch would it be more readable if this: NS_IF_ADDREF(aEncoder); were changed to: NS_IF_ADDREF(mErrEncoder); ?
Comment 10•19 years ago
|
||
Checked in with the change from comment 7.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Comment 11•19 years ago
|
||
Comment on attachment 190856 [details] [diff] [review] Patch I think we should take this for 1.8.
Attachment #190856 -
Flags: approval1.8b4?
Attachment #190856 -
Flags: approval1.8b4? → approval1.8b4+
Depends on: 306493
I think this caused bug 306493 because none of these classes' constructors actually initialize mErrEncoder to null. It should just be an nsCOMPtr anyway...
You need to log in
before you can comment on or make changes to this bug.
Description
•