registryValue->GetName(getter_Copies(entryName));
registryValue->GetNameUTF8(getter_Copies(entryName));
nsCategoryManager::initialize()  {    const char* kCategoriesRegistryPath = "software/mozilla/XPCOM/categories";      // Alas, this is kind of buried down here, but you can't put constant strings in a class declaration... oh, well      // Get a pointer to the registry, and get it open and ready for us    nsresult status;    if ( mRegistry = do_GetService(NS_REGISTRY_PROGID, &status) )      if ( NS_SUCCEEDED(status = mRegistry->OpenWellKnownRegistry(nsIRegistry::ApplicationComponentRegistry)) )        if ( (status = mRegistry->GetSubtree(nsIRegistry::Common, kCategoriesRegistryPath, &mCategoriesRegistryKey)) == NS_ERROR_REG_NOT_FOUND )          status = mRegistry->AddSubtree(nsIRegistry::Common, kCategoriesRegistryPath, &mCategoriesRegistryKey);      // All right, we've got the registry now (or not), that's the important thing.      //  Returning an error will cause callers to destroy me.  So not getting the registry      //  is worth returning an error for (I can't live without it).  Now we'll load in our      //  persistent data from the registry, but that's _not_ worth getting killed over, so      //  don't save any errors from this process.      // Now load the registry data    if ( NS_SUCCEEDED(status) )      {        nsCOMPtr<nsIEnumerator> keys;        mRegistry->EnumerateSubtrees(mCategoriesRegistryKey, getter_AddRefs(keys));        for ( keys->First(); keys->IsDone() == NS_ENUMERATOR_FALSE; keys->Next() )          {            nsXPIDLCString categoryName;            nsRegistryKey categoryKey;            {              nsCOMPtr<nsISupports> supportsNode;              keys->CurrentItem(getter_AddRefs(supportsNode));              nsCOMPtr<nsIRegistryNode> registryNode = do_QueryInterface(supportsNode);              registryNode->GetName(getter_Copies(categoryName));              registryNode->GetKey(&categoryKey);            }            nsCOMPtr<nsIEnumerator> values;            mRegistry->EnumerateValues(categoryKey, getter_AddRefs(values));            for ( values->First(); values->IsDone() == NS_ENUMERATOR_FALSE; values->Next() )              {                nsXPIDLCString entryName;                {                  nsCOMPtr<nsISupports> supportsValue;                  values->CurrentItem(getter_AddRefs(supportsValue));                  nsCOMPtr<nsIRegistryValue> registryValue = do_QueryInterface(supportsValue);                  registryValue->GetName(getter_Copies(entryName));                }                                nsXPIDLCString value;                mRegistry->GetStringUTF8(categoryKey, entryName, getter_Copies(value));                AddCategoryEntry(categoryName, entryName, value, PR_FALSE, PR_FALSE, 0);              }          }      }    return status;  }