Mike, Gavin, thanks for finding the users of PR_GetRandomNoise.
Among them, only nsMetricsService.cpp is using PR_GetRandomNoise
incorrectly. It uses PR_GetRandomNoise directly to generate a
random 32-bit number.
The problem of using PR_GetRandomNoise as a PRNG is that the
output of PR_GetRandomNoise, although random, may not be
uniformly distributed. This is why we need to feed it to
a PRNG to "whiten" the output.
Mike, Gavin, thanks for finding the users of PR_GetRandomNoise.
Among them, only nsMetricsServic e.cpp is using PR_GetRandomNoise
incorrectly. It uses PR_GetRandomNoise directly to generate a
random 32-bit number.
The problem of using PR_GetRandomNoise as a PRNG is that the
output of PR_GetRandomNoise, although random, may not be
uniformly distributed. This is why we need to feed it to
a PRNG to "whiten" the output.