diff options
Diffstat (limited to 'deps/v8/src/snapshot/read-only-deserializer.cc')
-rw-r--r-- | deps/v8/src/snapshot/read-only-deserializer.cc | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/deps/v8/src/snapshot/read-only-deserializer.cc b/deps/v8/src/snapshot/read-only-deserializer.cc index 7d1ff90b8c..c8a6651eb7 100644 --- a/deps/v8/src/snapshot/read-only-deserializer.cc +++ b/deps/v8/src/snapshot/read-only-deserializer.cc @@ -14,29 +14,24 @@ namespace v8 { namespace internal { -void ReadOnlyDeserializer::DeserializeInto(Isolate* isolate) { - Initialize(isolate); +void ReadOnlyDeserializer::DeserializeIntoIsolate() { + HandleScope scope(isolate()); - if (!allocator()->ReserveSpace()) { - V8::FatalProcessOutOfMemory(isolate, "ReadOnlyDeserializer"); - } - - ReadOnlyHeap* ro_heap = isolate->read_only_heap(); + ReadOnlyHeap* ro_heap = isolate()->read_only_heap(); // No active threads. - DCHECK_NULL(isolate->thread_manager()->FirstThreadStateInUse()); + DCHECK_NULL(isolate()->thread_manager()->FirstThreadStateInUse()); // No active handles. - DCHECK(isolate->handle_scope_implementer()->blocks()->empty()); + DCHECK(isolate()->handle_scope_implementer()->blocks()->empty()); // Read-only object cache is not yet populated. DCHECK(!ro_heap->read_only_object_cache_is_initialized()); // Startup object cache is not yet populated. - DCHECK(isolate->startup_object_cache()->empty()); + DCHECK(isolate()->startup_object_cache()->empty()); // Builtins are not yet created. - DCHECK(!isolate->builtins()->is_initialized()); + DCHECK(!isolate()->builtins()->is_initialized()); { - DisallowGarbageCollection no_gc; - ReadOnlyRoots roots(isolate); + ReadOnlyRoots roots(isolate()); roots.Iterate(this); ro_heap->read_only_space()->RepairFreeSpacesAfterDeserialization(); @@ -55,7 +50,7 @@ void ReadOnlyDeserializer::DeserializeInto(Isolate* isolate) { } if (FLAG_rehash_snapshot && can_rehash()) { - isolate->heap()->InitializeHashSeed(); + isolate()->heap()->InitializeHashSeed(); Rehash(); } } |