Fixing chrome registry leak. r=scc

This commit is contained in:
hyatt%netscape.com 2000-05-01 06:07:52 +00:00
Родитель f4a2cf6aba
Коммит e127cbfaf5
2 изменённых файлов: 24 добавлений и 26 удалений

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

@ -376,19 +376,6 @@ nsChromeRegistry::ConvertChromeURL(nsIURI* aChromeURL)
rv = SplitURL(aChromeURL, package, provider, remaining);
if (NS_FAILED(rv)) return rv;
if (!mInstallInitialized) {
// Load the installed search path for skins, content, and locales
// Prepend them to our list of substitutions
nsresult rv = GetInstallRoot(mInstallRoot);
if (NS_SUCCEEDED(rv)) {
mInstallInitialized = PR_TRUE;
AddToCompositeDataSource(PR_FALSE);
LoadStyleSheet(getter_AddRefs(mScrollbarSheet), "chrome://global/skin/scrollbars.css");
// This must always be the last line of install initialization!
}
}
if (!mProfileInitialized) {
// Just setSpec
nsresult rv = GetProfileRoot(mProfileRoot);
@ -408,6 +395,18 @@ nsChromeRegistry::ConvertChromeURL(nsIURI* aChromeURL)
LoadStyleSheet(getter_AddRefs(mUserSheet), userSheetURL);
}
}
else if (!mInstallInitialized) {
// Load the installed search path for skins, content, and locales
// Prepend them to our list of substitutions
nsresult rv = GetInstallRoot(mInstallRoot);
if (NS_SUCCEEDED(rv)) {
mInstallInitialized = PR_TRUE;
AddToCompositeDataSource(PR_FALSE);
LoadStyleSheet(getter_AddRefs(mScrollbarSheet), "chrome://global/skin/scrollbars.css");
// This must always be the last line of install initialization!
}
}
}
nsCAutoString finalURL;

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

@ -376,19 +376,6 @@ nsChromeRegistry::ConvertChromeURL(nsIURI* aChromeURL)
rv = SplitURL(aChromeURL, package, provider, remaining);
if (NS_FAILED(rv)) return rv;
if (!mInstallInitialized) {
// Load the installed search path for skins, content, and locales
// Prepend them to our list of substitutions
nsresult rv = GetInstallRoot(mInstallRoot);
if (NS_SUCCEEDED(rv)) {
mInstallInitialized = PR_TRUE;
AddToCompositeDataSource(PR_FALSE);
LoadStyleSheet(getter_AddRefs(mScrollbarSheet), "chrome://global/skin/scrollbars.css");
// This must always be the last line of install initialization!
}
}
if (!mProfileInitialized) {
// Just setSpec
nsresult rv = GetProfileRoot(mProfileRoot);
@ -408,6 +395,18 @@ nsChromeRegistry::ConvertChromeURL(nsIURI* aChromeURL)
LoadStyleSheet(getter_AddRefs(mUserSheet), userSheetURL);
}
}
else if (!mInstallInitialized) {
// Load the installed search path for skins, content, and locales
// Prepend them to our list of substitutions
nsresult rv = GetInstallRoot(mInstallRoot);
if (NS_SUCCEEDED(rv)) {
mInstallInitialized = PR_TRUE;
AddToCompositeDataSource(PR_FALSE);
LoadStyleSheet(getter_AddRefs(mScrollbarSheet), "chrome://global/skin/scrollbars.css");
// This must always be the last line of install initialization!
}
}
}
nsCAutoString finalURL;