Closed Bug 8930 Opened 25 years ago Closed 24 years ago

Use ns<SvcImpl>::GetCID() instead of kSvcMumble_CID

Categories

(Core :: XPCOM, defect, P3)

All
Other
defect

Tracking

()

RESOLVED WONTFIX

People

(Reporter: brendan, Assigned: dp)

Details

dp asked me to bug him about this:

Brendan Eich wrote:
>
> > servmgr->GetService(kComponentManagerCID, nsComponentManager::GetIID(),..);
>
> Can't the first arg be (and wouldn't it be better if it were)
> nsComponentManager::GetCID() ?

Yes. In fact, we could do this for all static objects comming out of
xpcom like Allocator.

I will keep this in mind. Would be better if you file a bug on me.

dp
Two points:

1. For services, I think this would be a good thing, but I would call it GetSID
instead.

2. For class IDs, this is a bad thing, because class IDs should never be in
interface header files. They should be stored somewhere else -- some file that
reflects all the current class' implementation CIDs. Remember that these can
change from release to release, upgrade to upgrade.
Status: NEW → ASSIGNED
Target Milestone: M10
Target Milestone: M10 → M15
QA Contact: beppe → dp
I dont think we are ever going to fix this. As warren points out, CID cannot be
a function of the interface. Putting it on a class seems awkward too.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.