PR_AtomicIncrement(&g_InstanceCount);
nsWinCharset::nsWinCharset(){  NS_INIT_REFCNT();  PR_AtomicIncrement(&g_InstanceCount);  PR_AtomicIncrement(&gCnt); // count for gInfo  // XXX We should make the following block critical section  if(nsnull == gInfo)  {     nsAutoString propertyURL; propertyURL.AssignWithConversion("resource:/res/wincharset.properties");     nsURLProperties *info = new nsURLProperties( propertyURL );     NS_ASSERTION( info , " cannot create nsURLProperties");     gInfo = info;  }  NS_ASSERTION(gInfo, "Cannot open property file");  if( gInfo )   {          UINT acp = ::GetACP();          PRInt32 acpint = (PRInt32)(acp & 0x00FFFF);          nsAutoString acpKey; acpKey.AssignWithConversion("acp.");          acpKey.AppendInt(acpint, 10);          nsresult res = gInfo->Get(acpKey, mCharset);          if(NS_FAILED(res)) {              mCharset.AssignWithConversion("windows-1252");          }  } else {        mCharset.AssignWithConversion("windows-1252");  }}