res = node->GetName(&name);
res = node->GetNameUTF8(&name);
void nsCharsetConverterManager::FillInfoArrays() {  nsresult res = NS_OK;  nsIEnumerator * components = NULL;  nsIRegistry * registry = NULL;  nsRegistryKey uconvKey, key;  PRBool regOpen = PR_FALSE;  // get the registry  res = nsServiceManager::GetService(NS_REGISTRY_PROGID,     NS_GET_IID(nsIRegistry), (nsISupports**)&registry);  if (NS_FAILED(res)) goto done;  // open registry if necessary  registry->IsOpen(&regOpen);  if (!regOpen) {    res = registry->OpenWellKnownRegistry(nsIRegistry::ApplicationComponentRegistry);    if (NS_FAILED(res)) goto done;  }  // get subtree  res = registry->GetSubtree(nsIRegistry::Common,      "software/netscape/intl/uconv", &uconvKey);  if (NS_FAILED(res)) goto done;  // enumerate subtrees  res = registry->EnumerateSubtrees(uconvKey, &components);  if (NS_FAILED(res)) goto done;  res = components->First();  if (NS_FAILED(res)) goto done;  while (NS_OK != components->IsDone()) {    nsISupports * base = NULL;    nsIRegistryNode * node = NULL;    char * name = NULL;    char * src = NULL;    char * dest = NULL;    nsConverterInfo * ci = NULL;    res = components->CurrentItem(&base);    if (NS_FAILED(res)) goto done1;    res = base->QueryInterface(kRegistryNodeIID, (void**)&node);    if (NS_FAILED(res)) goto done1;    res = node->GetName(&name);    if (NS_FAILED(res)) goto done1;    ci = new nsConverterInfo();    if (ci == NULL) goto done1;    if (!(ci->mCID.Parse(name))) goto done1;    res = node->GetKey(&key);    if (NS_FAILED(res)) goto done1;    res = registry->GetStringUTF8(key, "source", &src);    if (NS_FAILED(res)) goto done1;    res = registry->GetStringUTF8(key, "destination", &dest);    if (NS_FAILED(res)) goto done1;    // XXX do an alias resolution here instead    if (!strcmp(src, "Unicode")) {      ci->mName = new nsString(dest);      ci->mName->ToLowerCase();      mEncoderArray.AddObject(ci);    } else if (!strcmp(dest, "Unicode")) {      ci->mName = new nsString(src);      ci->mName->ToLowerCase();      mDecoderArray.AddObject(ci);    } else goto done1;    ci = NULL;done1:    NS_IF_RELEASE(base);    NS_IF_RELEASE(node);    if (name != NULL) nsCRT::free(name);    if (src != NULL) nsCRT::free(src);    if (dest != NULL) nsCRT::free(dest);    if (ci != NULL) delete ci;    res = components->Next();    if (NS_FAILED(res)) break; // this is NOT supposed to fail!  }  // finish and clean updone:  if (registry != NULL) {    nsServiceManager::ReleaseService(NS_REGISTRY_PROGID, registry);  }  NS_IF_RELEASE(components);}