Closed
Bug 86734
Opened 23 years ago
Closed 23 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•23 years ago
|
||
Reassign to myself.
Assignee: mscott → cavin
Summary: Code clean up for NS_WITH_SERVICE() → Code cleanup for NS_WITH_SERVICE()
Comment 2•23 years ago
|
||
Oh yeah, I've been waiting for something like this.
Comment 3•23 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•23 years ago
|
||
Assignee | ||
Comment 6•23 years ago
|
||
rs=scc
Assignee | ||
Comment 7•23 years ago
|
||
Filed bugscape bug 7887 for the Netscape side of this. Updated patch coming up.
Assignee | ||
Comment 8•23 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•23 years ago
|
QA Contact: esther → stephend
Assignee | ||
Comment 10•23 years ago
|
||
Checked in.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
verified fixed via code verification (LXR)
Status: RESOLVED → VERIFIED
Updated•20 years ago
|
Product: MailNews → Core
Updated•16 years ago
|
Product: Core → MailNews Core
You need to log in
before you can comment on or make changes to this bug.
Description
•