PRUint32    numOldProfiles = 0; PRUnichar   **nameArray = nsnull; rv = GetProfileListX(nsIProfileInternal::LIST_ONLY_OLD, &numOldProfiles, &nameArray); if (NS_FAILED(rv)) return rv; for (PRUint32 i = 0; i < numOldProfiles; i++) { rv = MigrateProfile(nameArray[i]); if (NS_FAILED(rv)) break; } NS_FREE_XPCOM_ALLOCATED_POINTER_ARRAY(numOldProfiles, nameArray); return rv;
NS_IMETHODIMP nsProfile::MigrateAllProfiles(){    nsresult rv;    PRUint32    numOldProfiles = 0;    PRUnichar   **nameArray = nsnull;    rv = GetProfileListX(nsIProfileInternal::LIST_ONLY_OLD, &numOldProfiles, &nameArray);    if (NS_FAILED(rv)) return rv;    for (PRUint32 i = 0; i < numOldProfiles; i++)    {        rv = MigrateProfile(nameArray[i]);        if (NS_FAILED(rv)) break;    }    NS_FREE_XPCOM_ALLOCATED_POINTER_ARRAY(numOldProfiles, nameArray);    return rv;}