mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-19 01:10:22 +00:00
fix for bugs 17234,17416 r=tor,bruce
This commit is contained in:
parent
e2212a0323
commit
9c63f59cdd
@ -473,7 +473,8 @@ NS_IMETHODIMP nsChromeRegistry::GetOverlayDataSource(nsIURI *aChromeURL, nsIRDFD
|
||||
overlayFile += "/";
|
||||
overlayFile += "overlays.rdf";
|
||||
|
||||
void *data = mDataSourceTable->Get(&nsStringKey(overlayFile));
|
||||
nsStringKey skey(overlayFile);
|
||||
void *data = mDataSourceTable->Get(&skey);
|
||||
if (data)
|
||||
{
|
||||
nsCOMPtr<nsIRDFDataSource> dataSource;
|
||||
@ -563,7 +564,8 @@ NS_IMETHODIMP nsChromeRegistry::LoadDataSource(const nsCAutoString &aFileName, n
|
||||
mDataSourceTable = new nsSupportsHashtable;
|
||||
|
||||
nsCOMPtr<nsISupports> supports = do_QueryInterface(remote);
|
||||
mDataSourceTable->Put(&nsStringKey(aFileName), (void*)supports.get());
|
||||
nsStringKey skey(aFileName);
|
||||
mDataSourceTable->Put(&skey, (void*)supports.get());
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
@ -587,7 +589,8 @@ nsChromeRegistry::InitializeDataSource(nsString &aPackage,
|
||||
if (mDataSourceTable)
|
||||
{
|
||||
// current.rdf and overlays.rdf are loaded in pairs and so if one is loaded, the other should be too.
|
||||
void *data = mDataSourceTable->Get(&nsStringKey(chromeFile));
|
||||
nsStringKey skey(chromeFile);
|
||||
void *data = mDataSourceTable->Get(&skey);
|
||||
if (data)
|
||||
{
|
||||
nsCOMPtr<nsIRDFDataSource> dataSource;
|
||||
|
@ -473,7 +473,8 @@ NS_IMETHODIMP nsChromeRegistry::GetOverlayDataSource(nsIURI *aChromeURL, nsIRDFD
|
||||
overlayFile += "/";
|
||||
overlayFile += "overlays.rdf";
|
||||
|
||||
void *data = mDataSourceTable->Get(&nsStringKey(overlayFile));
|
||||
nsStringKey skey(overlayFile);
|
||||
void *data = mDataSourceTable->Get(&skey);
|
||||
if (data)
|
||||
{
|
||||
nsCOMPtr<nsIRDFDataSource> dataSource;
|
||||
@ -563,7 +564,8 @@ NS_IMETHODIMP nsChromeRegistry::LoadDataSource(const nsCAutoString &aFileName, n
|
||||
mDataSourceTable = new nsSupportsHashtable;
|
||||
|
||||
nsCOMPtr<nsISupports> supports = do_QueryInterface(remote);
|
||||
mDataSourceTable->Put(&nsStringKey(aFileName), (void*)supports.get());
|
||||
nsStringKey skey(aFileName);
|
||||
mDataSourceTable->Put(&skey, (void*)supports.get());
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
@ -587,7 +589,8 @@ nsChromeRegistry::InitializeDataSource(nsString &aPackage,
|
||||
if (mDataSourceTable)
|
||||
{
|
||||
// current.rdf and overlays.rdf are loaded in pairs and so if one is loaded, the other should be too.
|
||||
void *data = mDataSourceTable->Get(&nsStringKey(chromeFile));
|
||||
nsStringKey skey(chromeFile);
|
||||
void *data = mDataSourceTable->Get(&skey);
|
||||
if (data)
|
||||
{
|
||||
nsCOMPtr<nsIRDFDataSource> dataSource;
|
||||
|
Loading…
x
Reference in New Issue
Block a user