if (!list) {
NS_ENSURE_TRUE(list, NS_ERROR_OUT_OF_MEMORY);  NS_ADDREF(list);  IdAndNameMapEntry *entry = NS_STATIC_CAST(IdAndNameMapEntry *, PL_DHashTableOperate(aHash, &aName, PL_DHASH_ADD));  if (!entry) { NS_RELEASE(list);
AddEmptyListToHash(const nsAReadableString& aName, nsHashtable& aHash){  nsBaseContentList *list = new nsBaseContentList();  if (!list) {    return NS_ERROR_OUT_OF_MEMORY;  }  NS_ADDREF(list);  nsStringKey key(aName);  aHash.Put(&key, list);  return NS_OK;}