mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 20:05:49 +00:00
Fix for 18315 -- remember which rdf files you've tried, and failed, to open, to avoid trying over and over and over again. r=pavlov.
This commit is contained in:
parent
fe7238681a
commit
1d8bdd81f8
@ -555,17 +555,23 @@ NS_IMETHODIMP nsChromeRegistry::LoadDataSource(const nsCAutoString &aFileName, n
|
||||
if (! remote)
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
|
||||
if (!mDataSourceTable)
|
||||
mDataSourceTable = new nsSupportsHashtable;
|
||||
|
||||
rv = remote->Init(aFileName);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
if (NS_FAILED(rv)) {
|
||||
nsStringKey skey(aFileName);
|
||||
mDataSourceTable->Put(&skey, nsnull);
|
||||
return rv;
|
||||
}
|
||||
|
||||
// We need to read this synchronously.
|
||||
rv = remote->Refresh(PR_TRUE);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
|
||||
if (!mDataSourceTable)
|
||||
mDataSourceTable = new nsSupportsHashtable;
|
||||
if (NS_FAILED(rv)) {
|
||||
nsStringKey skey(aFileName);
|
||||
mDataSourceTable->Put(&skey, nsnull);
|
||||
return rv;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsISupports> supports = do_QueryInterface(remote);
|
||||
nsStringKey skey(aFileName);
|
||||
@ -609,6 +615,8 @@ nsChromeRegistry::InitializeDataSource(nsString &aPackage,
|
||||
}
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
else if (mDataSourceTable->Exists(&skey))
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIRDFDataSource> overlayDataSource;
|
||||
|
@ -555,17 +555,23 @@ NS_IMETHODIMP nsChromeRegistry::LoadDataSource(const nsCAutoString &aFileName, n
|
||||
if (! remote)
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
|
||||
if (!mDataSourceTable)
|
||||
mDataSourceTable = new nsSupportsHashtable;
|
||||
|
||||
rv = remote->Init(aFileName);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
if (NS_FAILED(rv)) {
|
||||
nsStringKey skey(aFileName);
|
||||
mDataSourceTable->Put(&skey, nsnull);
|
||||
return rv;
|
||||
}
|
||||
|
||||
// We need to read this synchronously.
|
||||
rv = remote->Refresh(PR_TRUE);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
|
||||
if (!mDataSourceTable)
|
||||
mDataSourceTable = new nsSupportsHashtable;
|
||||
if (NS_FAILED(rv)) {
|
||||
nsStringKey skey(aFileName);
|
||||
mDataSourceTable->Put(&skey, nsnull);
|
||||
return rv;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsISupports> supports = do_QueryInterface(remote);
|
||||
nsStringKey skey(aFileName);
|
||||
@ -609,6 +615,8 @@ nsChromeRegistry::InitializeDataSource(nsString &aPackage,
|
||||
}
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
else if (mDataSourceTable->Exists(&skey))
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIRDFDataSource> overlayDataSource;
|
||||
|
Loading…
Reference in New Issue
Block a user