From 0a67db947b302fd3ee9ece466ff02f97dd437244 Mon Sep 17 00:00:00 2001 From: "waterson%netscape.com" Date: Tue, 18 May 1999 03:53:18 +0000 Subject: [PATCH] Use nsServiceManager to get singleton datasources instead of nsComponentManager. git-svn-id: svn://10.0.0.236/trunk@32026 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/rdf/base/src/nsRDFService.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/mozilla/rdf/base/src/nsRDFService.cpp b/mozilla/rdf/base/src/nsRDFService.cpp index b1085d4bf8e..667a96930ad 100644 --- a/mozilla/rdf/base/src/nsRDFService.cpp +++ b/mozilla/rdf/base/src/nsRDFService.cpp @@ -36,6 +36,7 @@ #include "nsIRDFNode.h" #include "nsIRDFService.h" #include "nsIRDFXMLDataSource.h" +#include "nsIServiceManager.h" #include "nsRDFCID.h" #include "nsString.h" #include "nsXPIDLString.h" @@ -886,15 +887,17 @@ ServiceImpl::GetDataSource(const char* uri, nsIRDFDataSource** aDataSource) if (p) *p = '\0'; - rv = nsComponentManager::CreateInstance(progID, nsnull, - nsIRDFDataSource::GetIID(), - getter_AddRefs(ds)); + nsCOMPtr isupports; + rv = nsServiceManager::GetService(progID, kISupportsIID, getter_AddRefs(isupports), nsnull); if (progID != buf) delete[] progID; if (NS_FAILED(rv)) return rv; + ds = do_QueryInterface(isupports, &rv); + if (NS_FAILED(rv)) return rv; + rv = ds->Init(uri); if (NS_FAILED(rv)) return rv; }