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; }