AtomTableEntry *he = GetAtomHashEntry(aString); AtomImpl* atom = he->mAtom;  if (atom) {  if (!atom->IsPermanent()) { #ifdef NS_BUILD_REFCNT_LOGGING { nsrefcnt refcount = atom->GetRefCount(); do { NS_LOG_RELEASE(atom, --refcount, "AtomImpl"); } while (refcount); } #endif atom = new (atom) PermanentAtomImpl(); } } else {  atom = new (aString) PermanentAtomImpl(); he->mAtom = atom; if ( !atom ) { PL_DHashTableRawRemove(&gAtomTable, he); return nsnull; } }  NS_ADDREF(atom); return atom;
return NS_NewPermanentAtom(NS_ConvertUCS2toUTF8(aString));
NS_COM nsIAtom* NS_NewPermanentAtom( const nsAString& aString ){  AtomTableEntry *he = GetAtomHashEntry(aString);  AtomImpl* atom = he->mAtom;  if (atom) {    // ensure that it's permanent    if (!atom->IsPermanent()) {#ifdef NS_BUILD_REFCNT_LOGGING      {        nsrefcnt refcount = atom->GetRefCount();        do {          NS_LOG_RELEASE(atom, --refcount, "AtomImpl");        } while (refcount);      }#endif      atom = new (atom) PermanentAtomImpl();    }  } else {    // otherwise, make a new atom    atom = new (aString) PermanentAtomImpl();    he->mAtom = atom;    if ( !atom ) {      PL_DHashTableRawRemove(&gAtomTable, he);      return nsnull;    }  }  NS_ADDREF(atom);  return atom;}