Closed Bug 11511 Opened 25 years ago Closed 25 years ago

dtor cleaning up stuff that is only valid if Init called

Categories

(SeaMonkey :: MailNews: Address Book & Contacts, defect, P3)

x86
Windows NT
defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: jband_mozilla, Assigned: chuang)

Details

nsAbRDFDataSource::~nsAbRDFDataSource calls
mRDFService->UnregisterDataSource(this) even if mRDFService == nsnull or no
registration had actually happened.

Any component registered with component manager should behave safely if it is
created and released without any special init being called. JS code might do
this in searching for interesting components. It may not do anything useful, but
it should not crash in their destructors.
Assignee: hangas → chuang
Sending to Candice.
Status: NEW → ASSIGNED
Target Milestone: M9
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
fix checked in for nsAbRDFDataSource, nsCardDataSource and
nsDirectoryDataSource.
QA Contact: lchiang → ppandit
Changing QA contact to ppandit
Status: RESOLVED → VERIFIED
I checked the code and the fix looks is typically:

if (mRDFService)
 90   {
 91     mRDFService->UnregisterDataSource(this);
 92     nsServiceManager::ReleaseService(kRDFServiceCID, mRDFService);
 93     mRDFService = nsnull;
 94   }

VERIFIED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.