зеркало из https://github.com/mozilla/gecko-dev.git
Fix so we call GetSelectedLocale() safely. bug 71390. r=tao, timeless, sr=bienvenu
This commit is contained in:
Родитель
ae4d1335c4
Коммит
2b4f3f87b1
|
@ -78,7 +78,7 @@ nsMsgServiceProviderService::Init()
|
|||
nsCOMPtr<nsIChromeRegistry> chromeRegistry = do_GetService(kChromeRegistryCID, &rv);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
nsXPIDLString lc_name;
|
||||
nsAutoString tmpstr; tmpstr.AssignWithConversion("navigator");
|
||||
nsAutoString tmpstr; tmpstr.AssignWithConversion("global-region");
|
||||
rv = chromeRegistry->GetSelectedLocale(tmpstr.GetUnicode(), getter_Copies(lc_name));
|
||||
if (NS_SUCCEEDED(rv) && (const PRUnichar *)lc_name && nsCRT::strlen((const PRUnichar *)lc_name)) {
|
||||
|
||||
|
|
|
@ -115,7 +115,7 @@ NS_IMETHODIMP nsNoIncomingServer::CopyDefaultMessages(const char *folderNameOnDi
|
|||
nsCOMPtr<nsIChromeRegistry> chromeRegistry = do_GetService(kChromeRegistryCID, &rv);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
nsXPIDLString lc_name;
|
||||
nsAutoString tmpstr; tmpstr.AssignWithConversion("navigator");
|
||||
nsAutoString tmpstr; tmpstr.AssignWithConversion("global-region");
|
||||
rv = chromeRegistry->GetSelectedLocale(tmpstr.GetUnicode(), getter_Copies(lc_name));
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
nsAutoString localeStr(lc_name);
|
||||
|
|
Загрузка…
Ссылка в новой задаче