diff options
Diffstat (limited to 'deps/v8/src/heap/read-only-heap.cc')
-rw-r--r-- | deps/v8/src/heap/read-only-heap.cc | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/deps/v8/src/heap/read-only-heap.cc b/deps/v8/src/heap/read-only-heap.cc new file mode 100644 index 0000000000..a2c086fc0a --- /dev/null +++ b/deps/v8/src/heap/read-only-heap.cc @@ -0,0 +1,28 @@ +// Copyright 2019 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "src/heap/read-only-heap.h" + +#include "src/heap/spaces.h" + +namespace v8 { +namespace internal { + +// static +ReadOnlyHeap* ReadOnlyHeap::GetOrCreateReadOnlyHeap(Heap* heap) { + return new ReadOnlyHeap(new ReadOnlySpace(heap)); +} + +void ReadOnlyHeap::MaybeDeserialize(Isolate* isolate, + ReadOnlyDeserializer* des) { + des->DeserializeInto(isolate); +} + +void ReadOnlyHeap::OnHeapTearDown() { + delete read_only_space_; + delete this; +} + +} // namespace internal +} // namespace v8 |