зеркало из https://github.com/mozilla/pjs.git
Fixing chrome registry leak. r=scc
This commit is contained in:
Родитель
f4a2cf6aba
Коммит
e127cbfaf5
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче