v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
context-deserializer.h
Go to the documentation of this file.
1// Copyright 2017 the V8 project authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef V8_SNAPSHOT_CONTEXT_DESERIALIZER_H_
6#define V8_SNAPSHOT_CONTEXT_DESERIALIZER_H_
7
10
11namespace v8 {
12namespace internal {
13
14class Context;
15class Isolate;
16
17// Deserializes the context-dependent object graph rooted at a given object.
18// The ContextDeserializer is not expected to deserialize any code objects.
20 : public Deserializer<Isolate> {
21 public:
22 static MaybeDirectHandle<Context> DeserializeContext(
23 Isolate* isolate, const SnapshotData* data, size_t context_index,
24 bool can_rehash, DirectHandle<JSGlobalProxy> global_proxy,
25 DeserializeEmbedderFieldsCallback embedder_fields_deserializer);
26
27 private:
28 explicit ContextDeserializer(Isolate* isolate, const SnapshotData* data,
29 bool can_rehash)
30 : Deserializer(isolate, data->Payload(), data->GetMagicNumber(), false,
31 can_rehash) {}
32
33 // Deserialize a single object and the objects reachable from it.
34 MaybeDirectHandle<Object> Deserialize(
35 Isolate* isolate, DirectHandle<JSGlobalProxy> global_proxy,
36 DeserializeEmbedderFieldsCallback embedder_fields_deserializer);
37
38 void DeserializeEmbedderFields(
40 DeserializeEmbedderFieldsCallback embedder_fields_deserializer);
41
42 void DeserializeApiWrapperFields(
43 const v8::DeserializeAPIWrapperCallback& api_wrapper_callback);
44};
45
46} // namespace internal
47} // namespace v8
48
49#endif // V8_SNAPSHOT_CONTEXT_DESERIALIZER_H_
ContextDeserializer(Isolate *isolate, const SnapshotData *data, bool can_rehash)
#define V8_EXPORT_PRIVATE
Definition macros.h:460