Closed Bug 219400 Opened 21 years ago Closed 20 years ago

remove callers of nsServiceManager:: methods

Categories

(Core :: XPCOM, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.8beta1

People

(Reporter: dbaron, Assigned: darin.moz)

References

()

Details

Attachments

(1 file)

nsServiceManager::ReleaseService has been obsolete for ages.  Callers should be
replaced with NS_IF_RELEASE.
Attached patch v1 patchSplinter Review
remove (nearly) all uses of nsServiceManager:: methods.
Assignee: dbaron → darin
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.8beta
Attachment #165039 - Flags: review?(bsmedberg)
the plugin code still uses nsServiceManager::GetGlobalServiceManager for use
with deprecated xpcom-style plugins.
Summary: remove callers of nsServiceManager::ReleaseService → remove callers of nsServiceManager:: methods
Attachment #165039 - Flags: review?(bsmedberg) → review+
fixed-on-trunk
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
if lxr is to be trusted, this missed a file:
/xpfe/components/search/src/nsLocalSearchService.cpp, line 99 -- nsresult rv =
nsServiceManager::GetService(kRDFServiceCID,
/xpfe/components/search/src/nsLocalSearchService.cpp, line 140 --
nsServiceManager::ReleaseService(kRDFServiceCID, gRDFService);

and possibly:
/xpcom/tests/TestServMgr.cpp, line 102 -- err =
nsServiceManager::UnregisterService(kIMyServiceCID);
Thanks biesi,

The nsLocalSearchService.cpp one was real... I must have skipped over that one
somehow.  I went ahead and fixed it on the trunk.


> /xpcom/tests/TestServMgr.cpp, line 102 -- err =
> nsServiceManager::UnregisterService(kIMyServiceCID);

This one is actually commented out.
part of this patch was backed-out as a result of the aviary branch landing
Keywords: aviary-landing
The only changes needed were to nsBookmarksService.cpp, and I went ahead and
landed those.
Keywords: aviary-landing
This sorta caused bug 336586, through no fault of its own.  Before this checkin, the code was just calling a method on a member of a deleted object, and the member was a pointer to a service that had been released.  But the service was still kept alive by the service manager, so it sorta kinda worked.  After this checkin, the member got nulled out in the destructor, leading to a crash when dereferenced....
Depends on: 336586
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: