Index: src/bootstrapper.cc |
diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc |
index dc722cb7493a87b4205557701099471c53712a70..d48fe036a9c4bcdaf0b0c5b7b2048a8ebcd61367 100644 |
--- a/src/bootstrapper.cc |
+++ b/src/bootstrapper.cc |
@@ -1221,6 +1221,14 @@ void Genesis::InitializeGlobal(Handle<GlobalObject> inner_global, |
// Initialize the data slot. |
global_context()->set_data(heap->undefined_value()); |
+ |
+ { |
+ // Initialize the random seed slot. |
+ Handle<ByteArray> zeroed_byte_array( |
+ factory->NewByteArray(kRandomStateSize)); |
+ global_context()->set_random_seed(*zeroed_byte_array); |
+ memset(zeroed_byte_array->GetDataStartAddress(), 0, kRandomStateSize); |
+ } |
} |