The density distribution of flare loops and the mechanisms of their emission in the continuum are still open questions. On September 10, 2017 a prominent loop system appeared during the gradual phase of an X8.2 flare (SOL2017-09-10), visible in all passbands of SDO/AIA and in the white-light continuum of SDO/HMI. We investigate its electron density by taking into account all radiation processes in the flare loops, i.e. the Thomson continuum, hydrogen Paschen and Brackett recombination continua, as well as free-free continuum emission. We derive a quadratic function of the electron density for a given temperature and effective loop thickness. By absolutely calibrating SDO/HMI intensities, we convert the measured intensities into electron density at each pixel in the loops. For a grid of plausible temperatures between cool (6000 K) and hot (10^6 K) structures, the electron density is computed for representative effective thicknesses between 200 and 20 000 km. We obtain a relatively high maximum electron density, about 10^13 cm^-3. At such high electron densities, the Thomson continuum is negligible and therefore one would not expect a significant polarization degree in dense loops. We conclude that the Paschen and Brackett recombination continua are dominant in cool flare loops, while the free-free continuum emission is dominant for warmer and hot loops.