mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 05:41:12 +00:00
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:
parent
066398b5bf
commit
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);
|
||||
|
Loading…
Reference in New Issue
Block a user