Closed
Bug 86734
Opened 24 years ago
Closed 24 years ago
Code cleanup for NS_WITH_SERVICE()
Categories
(MailNews Core :: Backend, defect)
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: cavin, Assigned: jag+mozilla)
Details
Attachments
(2 files)
554.00 KB,
patch
|
Details | Diff | Splinter Review | |
553.15 KB,
patch
|
Details | Diff | Splinter Review |
Just a reminder for code cleanup.
Shouldn't be adding code that uses NS_WITH_SERVICE(). So instead of using:
static NS_DEFINE_CID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
NS_WITH_SERVICE(nsIStringBundleService, sBundleService, kStringBundleServiceCID,
&rv);
Use the following instead:
nsCOMPtr<nsIStringBundleService> sBundleService =
do_GetService(NS_STRINGBUNDLE_CONTRACTID, &rv);
Notice that there is no static CID here. The same goes for
NS_WITH_SERVICE(nsIPref, prefs, kPrefServiceCID, &rv);
A lot of mailnews files have this problem.
Reporter | ||
Comment 1•24 years ago
|
||
Reassign to myself.
Assignee: mscott → cavin
Summary: Code clean up for NS_WITH_SERVICE() → Code cleanup for NS_WITH_SERVICE()
Comment 2•24 years ago
|
||
Oh yeah, I've been waiting for something like this.
Comment 3•24 years ago
|
||
FYI, this isn't too big a deal Cavin, and I would treat this with a very low
priority. Using the NS_WITH_SERVICE macros doesn't break anything and we've got
more important fish to fry right now than to go through and change a bunch of
old callers over.....
Assignee | ||
Comment 5•24 years ago
|
||
Assignee | ||
Comment 6•24 years ago
|
||
rs=scc
Assignee | ||
Comment 7•24 years ago
|
||
Filed bugscape bug 7887 for the Netscape side of this.
Updated patch coming up.
Assignee | ||
Comment 8•24 years ago
|
||
r=dbaron (trusting the perl script, after looking at some nice examples where it
handled all sorts of things correctly)
You probably shouldn't check in nsIServiceManager.h before midnight due to the
closure, and you should definitely post to n.p.m.{seamonkey,xpcom}, and may want
to wait a bit after that although probably not.
Updated•24 years ago
|
QA Contact: esther → stephend
Assignee | ||
Comment 10•24 years ago
|
||
Checked in.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
verified fixed via code verification (LXR)
Status: RESOLVED → VERIFIED
Updated•21 years ago
|
Product: MailNews → Core
Updated•17 years ago
|
Product: Core → MailNews Core
You need to log in
before you can comment on or make changes to this bug.
Description
•