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
8
#include "
src/snapshot/deserializer.h
"
9
#include "
src/snapshot/snapshot-data.h
"
10
11
namespace
v8
{
12
namespace
internal
{
13
14
class
Context;
15
class
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.
19
class
V8_EXPORT_PRIVATE
ContextDeserializer
final
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(
39
DirectHandle<NativeContext>
context,
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_
v8::internal::ContextDeserializer
Definition
context-deserializer.h:20
v8::internal::ContextDeserializer::ContextDeserializer
ContextDeserializer(Isolate *isolate, const SnapshotData *data, bool can_rehash)
Definition
context-deserializer.h:28
v8::internal::Deserializer
Definition
deserializer.h:44
v8::internal::DirectHandle
Definition
handles.h:659
v8::internal::Isolate
Definition
isolate.h:586
v8::internal::MaybeDirectHandle
Definition
maybe-handles.h:241
v8::internal::SnapshotData
Definition
snapshot-data.h:70
deserializer.h
v8::internal::internal
internal
Definition
wasm-objects-inl.h:458
v8
Definition
api-arguments-inl.h:19
snapshot-data.h
V8_EXPORT_PRIVATE
#define V8_EXPORT_PRIVATE
Definition
macros.h:460
v8::DeserializeAPIWrapperCallback
Definition
v8-snapshot.h:116
v8::internal::DeserializeEmbedderFieldsCallback
Definition
serializer-deserializer.h:300
src
snapshot
context-deserializer.h
Generated on Sun Apr 6 2025 21:08:57 for v8 by
1.12.0