Commit 1deefe5e authored by David Carlier's avatar David Carlier Committed by Commit Bot

Enabling arc4random API for the random generator on BSD

Those two BSD flavors supports this API since long years
and underlyingly it is a ChaCha flavor with good performances.

Change-Id: Ic4266f5ef3e17af95de97844a6b7ebba4a56802d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1869200Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64454}
parent 725e7dd7
......@@ -51,7 +51,7 @@ RandomNumberGenerator::RandomNumberGenerator() {
result = rand_s(&second_half);
DCHECK_EQ(0, result);
SetSeed((static_cast<int64_t>(first_half) << 32) + second_half);
#elif V8_OS_MACOSX
#elif V8_OS_MACOSX || V8_OS_FREEBSD || V8_OS_OPENBSD
// Despite its prefix suggests it is not RC4 algorithm anymore.
// It always succeeds while having decent performance and
// no file descriptor involved.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment