Closed
Bug 11516
Opened 25 years ago
Closed 25 years ago
XULSortServiceImpl dtor can release 'this'
Categories
(Core Graveyard :: RDF, defect, P3)
Tracking
(Not tracked)
VERIFIED
FIXED
M10
People
(Reporter: jband_mozilla, Assigned: mozilla)
Details
XULSortServiceImpl::~XULSortServiceImpl does
if (gXULSortService)
{
nsServiceManager::ReleaseService(kXULSortServiceCID, gXULSortService);
gXULSortService = nsnull;
}
This assumes that the service manager is actually holding a refeence. In a
simple case where the sm is *not* holding a reference then is can cause the
equiv. of NS_RELEASE(this) when this mRefcnt == 0 and an assertion rightly
follows.
At minimul, I sugges that you change the conditional to:
if (gXULSortService && gXULSortService != this)
But I'm unclear how this gRefCnt can go to 0 if the service manager *does* still
hold a reference?
I'm running code in xpcshell to create and release this progid and see the
failure. Does apprunner every actually call this code in the dtor?
in xpcshell one can run:
var name = "component://netscape/rdf/xul-sort-service";
try {
var foo = Components.classes[name].createInstance();
print(foo);
foo = null;
gc();
} catch(e) {
print("caught+e");
}
Assignee | ||
Updated•25 years ago
|
Status: NEW → ASSIGNED
Target Milestone: M10
Assignee | ||
Updated•25 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 1•25 years ago
|
||
Fixed.
Updated•6 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•