fix for bugs 17234,17416 r=tor,bruce

This commit is contained in:
pavlov%netscape.com 1999-10-29 08:36:47 +00:00
Родитель 46e7121a8c
Коммит 790c738256
2 изменённых файлов: 12 добавлений и 6 удалений

Просмотреть файл

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