Chromium Code Reviews| Index: src/isolate.cc |
| diff --git a/src/isolate.cc b/src/isolate.cc |
| index 61d2b2d89d05888261129db687b60efcc8def66e..0266f5113245fb0d54ba7c6befbeded99e160182 100644 |
| --- a/src/isolate.cc |
| +++ b/src/isolate.cc |
| @@ -2038,10 +2038,17 @@ bool Isolate::Init(Deserializer* des) { |
| stack_guard_.InitThread(lock); |
| } |
| + ASSERT(!heap_.HasBeenSetUp()); |
| + if (!heap_.SetUp()) { |
| + V8::FatalProcessOutOfMemory("heap preparation"); |
|
Michael Starzinger
2013/02/25 12:00:57
s/heap preparation/heap setup/
danno
2013/02/25 14:25:05
Done.
|
| + return false; |
| + } |
| + |
| + deoptimizer_data_ = new DeoptimizerData; |
| + |
| // SetUp the object heap. |
|
Michael Starzinger
2013/02/25 12:00:57
Move this comment up to before the assertion in li
danno
2013/02/25 14:25:05
Done.
|
| const bool create_heap_objects = (des == NULL); |
| - ASSERT(!heap_.HasBeenSetUp()); |
| - if (!heap_.SetUp(create_heap_objects)) { |
| + if (create_heap_objects && !heap_.CreateHeapObjects()) { |
| V8::FatalProcessOutOfMemory("heap setup"); |
|
Michael Starzinger
2013/02/25 12:00:57
s/heap setup/heap object creation/
danno
2013/02/25 14:25:05
Done.
|
| return false; |
| } |
| @@ -2076,8 +2083,6 @@ bool Isolate::Init(Deserializer* des) { |
| debug_->SetUp(create_heap_objects); |
| #endif |
| - deoptimizer_data_ = new DeoptimizerData; |
| - |
| // If we are deserializing, read the state into the now-empty heap. |
| if (!create_heap_objects) { |
| des->Deserialize(); |