Use nsServiceManager to get singleton datasources instead of nsComponentManager.
git-svn-id: svn://10.0.0.236/trunk@32026 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -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<nsISupports> 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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user