mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 07:42:04 +00:00
parent
9bfe3f2e81
commit
920f29e288
@ -252,8 +252,28 @@ nsChromeRegistry::nsChromeRegistry()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static PRBool DatasourceEnumerator(nsHashKey *aKey, void *aData, void* closure)
|
||||
{
|
||||
if (!closure || !aData)
|
||||
return PR_FALSE;
|
||||
|
||||
nsIRDFCompositeDataSource* compositeDS = (nsIRDFCompositeDataSource*) closure;
|
||||
|
||||
nsCOMPtr<nsISupports> supports = (nsISupports*)aData;
|
||||
|
||||
nsCOMPtr<nsIRDFDataSource> dataSource = do_QueryInterface(supports);
|
||||
if (!dataSource)
|
||||
return PR_FALSE;
|
||||
|
||||
compositeDS->RemoveDataSource(dataSource);
|
||||
return PR_TRUE;
|
||||
}
|
||||
|
||||
|
||||
nsChromeRegistry::~nsChromeRegistry()
|
||||
{
|
||||
mDataSourceTable->Enumerate(DatasourceEnumerator, mChromeDataSource);
|
||||
delete mDataSourceTable;
|
||||
|
||||
if (mRDFService) {
|
||||
|
@ -252,8 +252,28 @@ nsChromeRegistry::nsChromeRegistry()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static PRBool DatasourceEnumerator(nsHashKey *aKey, void *aData, void* closure)
|
||||
{
|
||||
if (!closure || !aData)
|
||||
return PR_FALSE;
|
||||
|
||||
nsIRDFCompositeDataSource* compositeDS = (nsIRDFCompositeDataSource*) closure;
|
||||
|
||||
nsCOMPtr<nsISupports> supports = (nsISupports*)aData;
|
||||
|
||||
nsCOMPtr<nsIRDFDataSource> dataSource = do_QueryInterface(supports);
|
||||
if (!dataSource)
|
||||
return PR_FALSE;
|
||||
|
||||
compositeDS->RemoveDataSource(dataSource);
|
||||
return PR_TRUE;
|
||||
}
|
||||
|
||||
|
||||
nsChromeRegistry::~nsChromeRegistry()
|
||||
{
|
||||
mDataSourceTable->Enumerate(DatasourceEnumerator, mChromeDataSource);
|
||||
delete mDataSourceTable;
|
||||
|
||||
if (mRDFService) {
|
||||
|
Loading…
Reference in New Issue
Block a user