v8
10.1.124 (node 18.2.0)
V8 is Google's open source JavaScript engine
|
#include <v8-cppgc.h>
Public Types | |
using | InternalFieldIndex = int |
Public Member Functions | |
constexpr | WrapperDescriptor (InternalFieldIndex wrappable_type_index, InternalFieldIndex wrappable_instance_index, uint16_t embedder_id_for_garbage_collected) |
Data Fields | |
InternalFieldIndex | wrappable_type_index |
InternalFieldIndex | wrappable_instance_index |
uint16_t | embedder_id_for_garbage_collected |
Static Public Attributes | |
static constexpr uint16_t | kUnknownEmbedderId = UINT16_MAX |
Describes how V8 wrapper objects maintain references to garbage-collected C++ objects.
Definition at line 39 of file v8-cppgc.h.
using InternalFieldIndex = int |
The index used on v8::Ojbect::SetAlignedPointerFromInternalField()
and related APIs to add additional data to an object which is used to identify JS->C++ references.
Definition at line 45 of file v8-cppgc.h.
|
inlineconstexpr |
Definition at line 53 of file v8-cppgc.h.
References WrapperDescriptor::embedder_id_for_garbage_collected, WrapperDescriptor::wrappable_instance_index, and WrapperDescriptor::wrappable_type_index.
uint16_t embedder_id_for_garbage_collected |
Embedder id identifying instances of garbage-collected objects. It is expected that the first field of the wrappable type is a uint16_t holding the id. Only references to instances of wrappables types with an id of embedder_id_for_garbage_collected
will be considered by CppHeap.
Definition at line 76 of file v8-cppgc.h.
Referenced by WrapperDescriptor::WrapperDescriptor().
|
staticconstexpr |
Unknown embedder id. The value is reserved for internal usages and must not be used with CppHeap
.
Definition at line 51 of file v8-cppgc.h.
InternalFieldIndex wrappable_instance_index |
Index of the wrappable instance.
Definition at line 68 of file v8-cppgc.h.
Referenced by WrapperDescriptor::WrapperDescriptor().
InternalFieldIndex wrappable_type_index |
Index of the wrappable type.
Definition at line 63 of file v8-cppgc.h.
Referenced by WrapperDescriptor::WrapperDescriptor().