зеркало из https://github.com/mozilla/gecko-dev.git
Bug 490835 nsMacCharset and nsOS2Charset shouldn't createInstance the locale service
Followup to bug 207333 for OS2 and Mac locale consumers r=smontagu sr=neil
This commit is contained in:
Родитель
066398b5bf
Коммит
531f559b6f
|
@ -41,7 +41,7 @@
|
|||
#include "nsGREResProperties.h"
|
||||
#include "nsUConvDll.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIComponentManager.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIMacLocale.h"
|
||||
#include "nsLocaleCID.h"
|
||||
#include "nsReadableUtils.h"
|
||||
|
@ -157,7 +157,7 @@ nsPlatformCharset::GetDefaultCharsetForLocale(const nsAString& localeName, nsACS
|
|||
{
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIMacLocale> pMacLocale;
|
||||
pMacLocale = do_CreateInstance(NS_MACLOCALE_CONTRACTID, &rv);
|
||||
pMacLocale = do_GetService(NS_MACLOCALE_CONTRACTID, &rv);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
short script, language, region;
|
||||
rv = pMacLocale->GetPlatformLocale(localeName, &script, &language, ®ion);
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
#include "nsCOMPtr.h"
|
||||
#include "nsReadableUtils.h"
|
||||
#include "nsLocaleCID.h"
|
||||
#include "nsIComponentManager.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsITimelineService.h"
|
||||
#include "nsPlatformCharset.h"
|
||||
|
||||
|
@ -163,7 +163,7 @@ nsPlatformCharset::GetDefaultCharsetForLocale(const nsAString& localeName, nsACS
|
|||
nsresult rv;
|
||||
oResult.Truncate();
|
||||
|
||||
os2Locale = do_CreateInstance(NS_OS2LOCALE_CONTRACTID, &rv);
|
||||
os2Locale = do_GetService(NS_OS2LOCALE_CONTRACTID, &rv);
|
||||
if (NS_FAILED(rv)) { return rv; }
|
||||
|
||||
rv = os2Locale->GetPlatformLocale(localeName, &codepage);
|
||||
|
|
Загрузка…
Ссылка в новой задаче