Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/snapshot/context-deserializer.h')
-rw-r--r--deps/v8/src/snapshot/context-deserializer.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/deps/v8/src/snapshot/context-deserializer.h b/deps/v8/src/snapshot/context-deserializer.h
new file mode 100644
index 00000000000..38549022380
--- /dev/null
+++ b/deps/v8/src/snapshot/context-deserializer.h
@@ -0,0 +1,43 @@
+// Copyright 2017 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.
+
+#ifndef V8_SNAPSHOT_CONTEXT_DESERIALIZER_H_
+#define V8_SNAPSHOT_CONTEXT_DESERIALIZER_H_
+
+#include "src/snapshot/deserializer.h"
+#include "src/snapshot/snapshot.h"
+
+namespace v8 {
+namespace internal {
+
+class Context;
+
+// Deserializes the context-dependent object graph rooted at a given object.
+// The ContextDeserializer is not expected to deserialize any code objects.
+class V8_EXPORT_PRIVATE ContextDeserializer final : public Deserializer {
+ public:
+ static MaybeHandle<Context> DeserializeContext(
+ Isolate* isolate, const SnapshotData* data, bool can_rehash,
+ Handle<JSGlobalProxy> global_proxy,
+ v8::DeserializeEmbedderFieldsCallback embedder_fields_deserializer);
+
+ private:
+ explicit ContextDeserializer(const SnapshotData* data)
+ : Deserializer(data, false) {}
+
+ // Deserialize a single object and the objects reachable from it.
+ MaybeHandle<Object> Deserialize(
+ Isolate* isolate, Handle<JSGlobalProxy> global_proxy,
+ v8::DeserializeEmbedderFieldsCallback embedder_fields_deserializer);
+
+ void DeserializeEmbedderFields(
+ v8::DeserializeEmbedderFieldsCallback embedder_fields_deserializer);
+
+ void SetupOffHeapArrayBufferBackingStores();
+};
+
+} // namespace internal
+} // namespace v8
+
+#endif // V8_SNAPSHOT_CONTEXT_DESERIALIZER_H_