Closed Bug 210337 Opened 21 years ago Closed 21 years ago

Remove dead cruft from XPCOM

Categories

(Core :: XPCOM, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.5alpha

People

(Reporter: benjamin, Assigned: benjamin)

Details

Attachments

(1 file)

XPCOM has some dead code that can be removed. Some of it still appears to be
#included by not actually used. So I've created a patch that removes unnecessary
#includes and stops building cruft.

The following files will be removed (I didn't include them in the patch, for
brevity):
xpcom/ds/nsHashtableEnumerator.h
xpcom/ds/nsHashtableEnumerator.cpp
xpcom/ds/nsIArena.idl
xpcom/ds/nsArena.h
xpcom/ds/nsArena.cpp
Comment on attachment 126277 [details] [diff] [review]
remove XPCOM cruft

r+sr=me on the content/* parts of this patch.
Attachment #126277 - Flags: review?(alecf)
Comment on attachment 126277 [details] [diff] [review]
remove XPCOM cruft

-NS_COM nsresult NS_NewObserver(nsIObserver** anObserver, nsISupports* outer)
-{
-    return nsObserver::Create(outer, NS_GET_IID(nsIObserver),
(void**)anObserver);
-}
-

can we get rid of nsObserver::Create()? actually why do we need nsObserver at
all? what does a default observer even do? (!)

r/sr=alecf on the xpcom stuff... even the removal of NS_NewISupportsPRBool.. :(
Attachment #126277 - Flags: review?(alecf) → review+
alec, the only reason I didn't remove nsObserver altogether is because it is a frozen interface. I didn't (and don't) know the rules about removing contractID implementations of frozen interfaces.

Really I think we need to be much more clear about which contractIDs are frozen, and what freezing them really means... (this  contractID will always support such and such set of interfaces). The header files that mark the contractIDs should have /* @status FROZEN */ comments just like the interface files do.
NS_NewObserver isn't an interface and it is not frozen. 
what alec said.  nsObserver.* is bogus.

fixed
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.5alpha
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: