From 75ea566f5abd09882b25b9335f5ae6c53a22fcb6 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Mon, 23 Sep 2013 14:27:26 +0200 Subject: [PATCH] src: fix v8 PRNG entropy seeding It was pointed out by a member of the V8 team that the call to V8::SetEntropySource() should come before V8::Initialize(). See also commit 7ac2391. --- src/node.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node.cc b/src/node.cc index 0f630c5..b736872 100644 --- a/src/node.cc +++ b/src/node.cc @@ -3223,13 +3223,13 @@ int Start(int argc, char** argv) { const char** exec_argv; Init(&argc, const_cast(argv), &exec_argc, &exec_argv); - V8::Initialize(); #if HAVE_OPENSSL // V8 on Windows doesn't have a good source of entropy. Seed it from // OpenSSL's pool. V8::SetEntropySource(crypto::EntropySource); #endif + V8::Initialize(); { Locker locker(node_isolate); Environment* env = -- 2.7.4