Bug 397216 - "nsPersistentProperties shutdown leak in uconv" [p=asqueella r=smontagu a1.9=damons]

This commit is contained in:
reed@reedloden.com 2007-10-05 12:30:37 -07:00
parent ede1b0bcd0
commit aece6e798b

View File

@ -49,7 +49,7 @@
#include "nsPlatformCharset.h"
static nsGREResProperties *gInfo = nsnull;
static PRInt32 gCnt= 0;
static PRInt32 gCnt = 0;
NS_IMPL_ISUPPORTS1(nsPlatformCharset, nsIPlatformCharset)
@ -57,6 +57,7 @@ nsPlatformCharset::nsPlatformCharset()
{
NS_TIMELINE_START_TIMER("nsPlatformCharset()");
PR_AtomicIncrement(&gCnt);
nsAutoString acpKey(NS_LITERAL_STRING("acp."));
acpKey.AppendInt(PRInt32(::GetACP() & 0x00FFFF), 10);
MapToCharset(acpKey, mCharset);
@ -77,8 +78,6 @@ nsPlatformCharset::~nsPlatformCharset()
nsresult
nsPlatformCharset::InitInfo()
{
PR_AtomicIncrement(&gCnt); // count for gInfo
if (gInfo == nsnull) {
nsGREResProperties *info = new nsGREResProperties(NS_LITERAL_CSTRING("wincharset.properties"));