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/+/1869200 Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Reviewed-by: Clemens Backes <clemensb@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#64454}
This commit is contained in:
parent
725e7dd75a
commit
1deefe5edd
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user