Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | Static Public Attributes | List of all members
v8::WrapperDescriptor Struct Referencefinal

#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)
 

Public Attributes

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
 

Detailed Description

Describes how V8 wrapper objects maintain references to garbage-collected C++ objects.

Member Typedef Documentation

◆ InternalFieldIndex

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.

Constructor & Destructor Documentation

◆ WrapperDescriptor()

constexpr v8::WrapperDescriptor::WrapperDescriptor ( InternalFieldIndex  wrappable_type_index,
InternalFieldIndex  wrappable_instance_index,
uint16_t  embedder_id_for_garbage_collected 
)
inlineconstexpr

Member Data Documentation

◆ embedder_id_for_garbage_collected

uint16_t v8::WrapperDescriptor::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.

◆ kUnknownEmbedderId

constexpr uint16_t v8::WrapperDescriptor::kUnknownEmbedderId = UINT16_MAX
staticconstexpr

Unknown embedder id. The value is reserved for internal usages and must not be used with CppHeap.

◆ wrappable_instance_index

InternalFieldIndex v8::WrapperDescriptor::wrappable_instance_index

Index of the wrappable instance.

◆ wrappable_type_index

InternalFieldIndex v8::WrapperDescriptor::wrappable_type_index

Index of the wrappable type.


The documentation for this struct was generated from the following file: