Closed
Bug 882
Opened 26 years ago
Closed 26 years ago
nsButton not initializing mRefCnt
Categories
(Core :: Layout: Form Controls, defect, P1)
Tracking
()
VERIFIED
FIXED
People
(Reporter: troy, Assigned: kmcclusk)
Details
Kevin,
Purify is complaining that the nsButton AddRef() member function is making an
uninitialized memory reference to mRefCnt.
That's because the Windows version of nsButton.h uses NS_DECL_ISUPPORTS which
gets a mRefCnt member data declared, but the constructor doesn't use
NS_INIT_REFCNT() to initialize the member data
I would have added that, but that isn't sufficient because nsBaseWidget also
uses NS_DECL_ISUPPORTS which means that nsButton really has two mRefCnt member
data. That's bad and needs to be fixed
Troy
Assignee | ||
Updated•26 years ago
|
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 1•26 years ago
|
||
Stopped using NS_DECL_ISUPPORTS macro on any Windows widget that derives
From nsBaseWidget.h. This removes the mRefCnt member variable defined through
the NS_DECL_ISUPPORTS macro. This problem was not confined to nsButton.h. I also
Modified nsCheckButton.h,
nsComboBox.h, nsDialog.h, nsLabel.h, nsListBox.h, nsRadioButton.h since they all
used NS_DECL_ISUPPORTS and derived from nsBaseWidget.
-- Kevin
Updated•26 years ago
|
Summary: nsButton not initializing mRefCnt → nsButton not initializing mRefCnt
Comment 2•26 years ago
|
||
[Pinged Troy by E-mail to request bug verification, since this is too deeply at
the code-level to be able to verify.]
Comment 3•26 years ago
|
||
troy can you please verify -- thanks
Comment 4•26 years ago
|
||
Troy provide a test case for verification
Updated•26 years ago
|
QA Contact: 4015
Updated•26 years ago
|
Status: RESOLVED → VERIFIED
Comment 5•26 years ago
|
||
based on discussion with Troy, marking bug as verified.
Moving all Widget Set bugs, past and present, to new HTML Form Controls
component per request from karnaze. Widget Set component will be retired
shortly.
You need to log in
before you can comment on or make changes to this bug.
Description
•