if (!enumObj) return NS_ERROR_OUT_OF_MEMORY;  *_retval = enumObj; NS_ADDREF(*_retval); return NS_OK;
if ( NS_SUCCEEDED(status = NS_NewHashtableEnumerator(this, ExtractKeyString, 0, getter_AddRefs(innerEnumerator)))) status = NS_NewAdapterEnumerator(_retval, innerEnumerator);   if ( NS_FAILED(status) ) { NS_IF_RELEASE(*_retval); status = NS_NewEmptyEnumerator(_retval); } return status;
nsCategoryManager::EnumerateCategories(nsISimpleEnumerator **_retval){  NS_ENSURE_ARG_POINTER(_retval);  PR_Lock(mLock);  CategoryEnumerator* enumObj = CategoryEnumerator::Create(mTable);  PR_Unlock(mLock);  if (!enumObj)    return NS_ERROR_OUT_OF_MEMORY;  *_retval = enumObj;  NS_ADDREF(*_retval);  return NS_OK;}