Landing for Justin Schuh.
authorager@chromium.org <ager@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 25 Nov 2010 07:39:17 +0000 (07:39 +0000)
committerager@chromium.org <ager@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 25 Nov 2010 07:39:17 +0000 (07:39 +0000)
commitbe0f740d990c3d8cad413fd864f235ceebc8db31
treea471cf7a0432b32a5c0701daba6aa1be26f93bc4
parent0634c50950a9e94f0615f6e43b0907341923458a
Landing for Justin Schuh.

Seed the random number generator in Windows with rand_s

This is a quick fix for m9. It works on Windows Chrome because the random device is already initialized before permissions are dropped for the Chrome sandbox. The same trick isn't possible on Linux or Mac.

I think the long-term solution is to provide an interface for supplying v8 with a true random number generator. Then Chrome can just hook up the generator from base/rand_util.h

BUG=http://code.google.com/p/v8/issues/detail?id=936
TEST=None.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5889 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
src/platform-win32.cc