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:
timeless@mozdev.org 2009-05-03 09:28:43 -07:00
parent 066398b5bf
commit 531f559b6f
2 changed files with 4 additions and 4 deletions

View File

@ -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, &region);

View File

@ -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);