Index: src/isolate.cc |
diff --git a/src/isolate.cc b/src/isolate.cc |
index 545c0dde3d2f709daa99438e99cafe6534094084..a3da4c8eab08a9a63c795bf2b2cb9abe50d6dbfd 100644 |
--- a/src/isolate.cc |
+++ b/src/isolate.cc |
@@ -2380,13 +2380,19 @@ bool Isolate::Init(Deserializer* des) { |
runtime_profiler_ = new RuntimeProfiler(this); |
// If we are deserializing, read the state into the now-empty heap. |
- if (!create_heap_objects) { |
- des->Deserialize(this); |
- } |
- load_stub_cache_->Initialize(); |
- store_stub_cache_->Initialize(); |
- if (FLAG_ignition || serializer_enabled()) { |
- interpreter_->Initialize(); |
+ { |
+ AlwaysAllocateScope always_allocate(this); |
+ |
+ if (!create_heap_objects) { |
+ des->Deserialize(this); |
+ } |
+ load_stub_cache_->Initialize(); |
+ store_stub_cache_->Initialize(); |
+ if (FLAG_ignition || serializer_enabled()) { |
+ interpreter_->Initialize(); |
+ } |
+ |
+ heap_.NotifyDeserializationComplete(); |
} |
// Finish initialization of ThreadLocal after deserialization is done. |
@@ -2417,8 +2423,6 @@ bool Isolate::Init(Deserializer* des) { |
time_millis_at_init_ = heap_.MonotonicallyIncreasingTimeInMs(); |
- heap_.NotifyDeserializationComplete(); |
- |
if (!create_heap_objects) { |
// Now that the heap is consistent, it's OK to generate the code for the |
// deopt entry table that might have been referred to by optimized code in |