remove callers of nsServiceManager:: methods

RESOLVED FIXED in mozilla1.8beta1

Status

()

RESOLVED FIXED
15 years ago
13 years ago

People

(Reporter: dbaron, Assigned: darin.moz)

Tracking

Trunk
mozilla1.8beta1
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

nsServiceManager::ReleaseService has been obsolete for ages.  Callers should be
replaced with NS_IF_RELEASE.
(Assignee)

Comment 1

14 years ago
Created attachment 165039 [details] [diff] [review]
v1 patch

remove (nearly) all uses of nsServiceManager:: methods.
Assignee: dbaron → darin
Status: NEW → ASSIGNED
(Assignee)

Updated

14 years ago
Target Milestone: --- → mozilla1.8beta
(Assignee)

Updated

14 years ago
Attachment #165039 - Flags: review?(bsmedberg)
(Assignee)

Comment 2

14 years ago
the plugin code still uses nsServiceManager::GetGlobalServiceManager for use
with deprecated xpcom-style plugins.
(Assignee)

Updated

14 years ago
Summary: remove callers of nsServiceManager::ReleaseService → remove callers of nsServiceManager:: methods

Updated

14 years ago
Attachment #165039 - Flags: review?(bsmedberg) → review+
(Assignee)

Comment 3

14 years ago
fixed-on-trunk
Status: ASSIGNED → RESOLVED
Last Resolved: 14 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);
(Assignee)

Comment 5

14 years ago
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.
(Assignee)

Comment 6

14 years ago
part of this patch was backed-out as a result of the aviary branch landing
Keywords: aviary-landing
(Assignee)

Comment 7

14 years ago
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.