diff --git a/xpfe/components/directory/nsDirectoryViewer.cpp b/xpfe/components/directory/nsDirectoryViewer.cpp index 3b4edd53829..dc0bfdaeb84 100644 --- a/xpfe/components/directory/nsDirectoryViewer.cpp +++ b/xpfe/components/directory/nsDirectoryViewer.cpp @@ -115,14 +115,20 @@ static const char kGopherProtocol[] = "gopher://"; // #ifdef MOZ_RDF -NS_IMPL_THREADSAFE_ISUPPORTS7(nsHTTPIndex, - nsIHTTPIndex, - nsIRDFDataSource, - nsIStreamListener, - nsIDirIndexListener, - nsIRequestObserver, - nsIInterfaceRequestor, - nsIFTPEventSink) +NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsHTTPIndex) + NS_INTERFACE_MAP_ENTRY(nsIHTTPIndex) + NS_INTERFACE_MAP_ENTRY(nsIRDFDataSource) + NS_INTERFACE_MAP_ENTRY(nsIStreamListener) + NS_INTERFACE_MAP_ENTRY(nsIDirIndexListener) + NS_INTERFACE_MAP_ENTRY(nsIRequestObserver) + NS_INTERFACE_MAP_ENTRY(nsIInterfaceRequestor) + NS_INTERFACE_MAP_ENTRY(nsIFTPEventSink) + NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIHTTPIndex) +NS_INTERFACE_MAP_END + +NS_IMPL_CYCLE_COLLECTION_1(nsHTTPIndex, mInner) +NS_IMPL_CYCLE_COLLECTING_ADDREF_AMBIGUOUS(nsHTTPIndex, nsIHttpIndex) +NS_IMPL_CYCLE_COLLECTING_RELEASE_AMBIGUOUS(nsHTTPIndex, nsIHttpIndex) NS_IMETHODIMP nsHTTPIndex::GetInterface(const nsIID &anIID, void **aResult ) diff --git a/xpfe/components/directory/nsDirectoryViewer.h b/xpfe/components/directory/nsDirectoryViewer.h index ff8f11f3ac8..42c156f5d9e 100644 --- a/xpfe/components/directory/nsDirectoryViewer.h +++ b/xpfe/components/directory/nsDirectoryViewer.h @@ -55,6 +55,7 @@ #include "nsXPIDLString.h" #include "nsIDirIndexListener.h" #include "nsIFTPChannel.h" +#include "nsCycleCollectionParticipant.h" class nsDirectoryViewerFactory : public nsIDocumentLoaderFactory { @@ -145,7 +146,8 @@ public: NS_DECL_NSIFTPEVENTSINK // nsISupports interface - NS_DECL_ISUPPORTS + NS_DECL_CYCLE_COLLECTING_ISUPPORTS + NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(nsHTTPIndex, nsIHTTPIndex) }; #endif