Closed
Bug 98735
Opened 24 years ago
Closed 24 years ago
NS_InitXPCOM2 has unused argument
Categories
(Core :: XPCOM, defect)
Tracking
()
RESOLVED
FIXED
mozilla0.9.5
People
(Reporter: adamlock, Assigned: dougt)
Details
The first argument of NS_InitXPCOM2 is supposed to return with a pointer to an
nsIServiceManager object. NS_InitXPCOM2 does nothing with it at all. Either it
should be fixed to return something or the argument should be removed (and in
NS_ShutdownXPCOM).
I think it's probably obselete, right?
Assignee | ||
Comment 1•24 years ago
|
||
Sorry about that:
Index: mozilla/xpcom/build/nsXPComInit.cpp
===================================================================
RCS file: /cvsroot/mozilla/xpcom/build/nsXPComInit.cpp,v
retrieving revision 1.101
diff -u -2 -r1.101 nsXPComInit.cpp
--- nsXPComInit.cpp 2001/09/06 21:12:52 1.101
+++ nsXPComInit.cpp 2001/09/07 21:26:37
@@ -342,4 +342,8 @@
gServiceManager = NS_STATIC_CAST(nsIServiceManager*, compMgr);
nsComponentManagerImpl::gComponentManager = compMgr;
+
+ if (result) {
+ NS_ADDREF(*result = servMgr);
+ }
}
Adam, could you review this change??
Keywords: patch
Target Milestone: --- → mozilla0.9.5
r=adamlock assuming the assignment within a macro is a safe operation.
But is this argument even needed anymore? Is there any legitimate reason the
caller would want a service manager pointer to be returned from NS_InitXPCOM?
Assignee | ||
Comment 3•24 years ago
|
||
Sure, it may want to cache it so that you do not have to link to xpcom to get
the service manager.
Rick, can I get some sr love?
Comment 4•24 years ago
|
||
hey doug,
Do you have some local mods in your tree? It looks like 'servMgr' should be
'gServiceManager'. I don't see a 'servMgr' variable in NS_InitXPCOM2(...)
Or is this just a test to see if i really *do* look at patches ;-)
sr=rpotts if you fix up 'servMgr' :-)
-- rick
Assignee | ||
Comment 5•24 years ago
|
||
Checking in nsXPComInit.cpp;
/cvsroot/mozilla/xpcom/build/nsXPComInit.cpp,v <-- nsXPComInit.cpp
new revision: 1.102; previous revision: 1.101
done
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•