res = node->GetName(&name);
res = node->GetNameUTF8(&name);
nsresult nsCharsetConverterManager::GetRegistryEnumeration(                                    char * aRegistryKey,                                     nsStringArray * aArray){  nsresult res = NS_OK;  nsIEnumerator * components = NULL;  nsIRegistry * registry = NULL;  nsRegistryKey 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, aRegistryKey, &key);  if (NS_FAILED(res)) goto done;  // enumerate subtrees  res = registry->EnumerateSubtrees(key, &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;    nsString * s = 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;    s = new nsString("charsetDetector.");    if (s == NULL) {      res = NS_ERROR_OUT_OF_MEMORY;      goto done1;    }    s->Append(name);    aArray->AppendString(*s);done1:    NS_IF_RELEASE(base);    NS_IF_RELEASE(node);    if (name != NULL) nsCRT::free(name);    if (s != NULL) delete s;    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);  return res;}