summaryrefslogtreecommitdiffstats
path: root/chromium/v8/src/snapshot/deserializer-allocator.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/v8/src/snapshot/deserializer-allocator.h')
-rw-r--r--chromium/v8/src/snapshot/deserializer-allocator.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/chromium/v8/src/snapshot/deserializer-allocator.h b/chromium/v8/src/snapshot/deserializer-allocator.h
index 979e6ed2a8b..9381e1302bd 100644
--- a/chromium/v8/src/snapshot/deserializer-allocator.h
+++ b/chromium/v8/src/snapshot/deserializer-allocator.h
@@ -6,8 +6,10 @@
#define V8_SNAPSHOT_DESERIALIZER_ALLOCATOR_H_
#include "src/common/globals.h"
+#include "src/execution/local-isolate-wrapper.h"
#include "src/heap/heap.h"
#include "src/objects/heap-object.h"
+#include "src/roots/roots.h"
#include "src/snapshot/references.h"
#include "src/snapshot/snapshot-data.h"
@@ -16,12 +18,13 @@ namespace internal {
class Deserializer;
class StartupDeserializer;
+class OffThreadHeap;
class DeserializerAllocator final {
public:
DeserializerAllocator() = default;
- void Initialize(Heap* heap) { heap_ = heap; }
+ void Initialize(LocalHeapWrapper heap);
// ------- Allocation Methods -------
// Methods related to memory allocation during deserialization.
@@ -99,7 +102,9 @@ class DeserializerAllocator final {
// back-references.
std::vector<HeapObject> deserialized_large_objects_;
- Heap* heap_;
+ // ReadOnlyRoots and heap are null until Initialize is called.
+ LocalHeapWrapper heap_ = LocalHeapWrapper(nullptr);
+ ReadOnlyRoots roots_ = ReadOnlyRoots(static_cast<Address*>(nullptr));
DISALLOW_COPY_AND_ASSIGN(DeserializerAllocator);
};