v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
shared-object-conveyor-handles.cc
Go to the documentation of this file.
1
// Copyright 2022 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
#include "
src/handles/shared-object-conveyor-handles.h
"
6
7
#include "
src/objects/objects-inl.h
"
8
9
namespace
v8
{
10
namespace
internal
{
11
12
// TODO(v8:12547): Currently the shared isolate owns all the conveyors. Change
13
// the owner to the main isolate once the shared isolate is removed.
14
SharedObjectConveyorHandles::SharedObjectConveyorHandles
(
Isolate
* isolate)
15
: persistent_handles_(
16
isolate->shared_space_isolate()->NewPersistentHandles()) {}
17
18
uint32_t
SharedObjectConveyorHandles::Persist
(
19
Tagged<HeapObject>
shared_object) {
20
DCHECK
(
IsShared
(shared_object));
21
uint32_t
id
=
static_cast<
uint32_t
>
(
shared_objects_
.size());
22
shared_objects_
.push_back(
persistent_handles_
->NewHandle(shared_object));
23
return
id;
24
}
25
26
}
// namespace internal
27
}
// namespace v8
v8::internal::Isolate
Definition
isolate.h:586
v8::internal::SharedObjectConveyorHandles::Persist
uint32_t Persist(Tagged< HeapObject > shared_object)
Definition
shared-object-conveyor-handles.cc:18
v8::internal::SharedObjectConveyorHandles::SharedObjectConveyorHandles
SharedObjectConveyorHandles(Isolate *isolate)
Definition
shared-object-conveyor-handles.cc:14
v8::internal::SharedObjectConveyorHandles::shared_objects_
std::vector< Handle< HeapObject > > shared_objects_
Definition
shared-object-conveyor-handles.h:50
v8::internal::SharedObjectConveyorHandles::persistent_handles_
std::unique_ptr< PersistentHandles > persistent_handles_
Definition
shared-object-conveyor-handles.h:49
v8::internal::Tagged
Definition
waiter-queue-node.h:21
v8::internal::internal
internal
Definition
wasm-objects-inl.h:458
v8::internal::IsShared
bool IsShared(Tagged< Object > obj)
Definition
objects-inl.h:1883
v8
Definition
api-arguments-inl.h:19
objects-inl.h
shared-object-conveyor-handles.h
DCHECK
#define DCHECK(condition)
Definition
logging.h:482
src
handles
shared-object-conveyor-handles.cc
Generated on Sun Apr 6 2025 21:08:54 for v8 by
1.12.0