v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
v8::internal::EmbedderNode Class Reference
Inheritance diagram for v8::internal::EmbedderNode:
Collaboration diagram for v8::internal::EmbedderNode:

Public Member Functions

 EmbedderNode (const HeapObjectHeader *header_address, cppgc::internal::HeapObjectName name, size_t size)
 
 ~EmbedderNode () override=default
 
const char * Name () final
 
size_t SizeInBytes () final
 
void SetWrapperNode (v8::EmbedderGraph::Node *wrapper_node)
 
NodeWrapperNode () final
 
void SetDetachedness (Detachedness detachedness)
 
Detachedness GetDetachedness () final
 
const char * InternalizeEdgeName (std::string edge_name)
 
const void * GetAddress () override
 
- Public Member Functions inherited from v8::EmbedderGraph::Node
 Node ()=default
 
virtual ~Node ()=default
 
virtual bool IsRootNode ()
 
virtual bool IsEmbedderNode ()
 
virtual const char * NamePrefix ()
 
virtual NativeObject GetNativeObject ()
 
 Node (const Node &)=delete
 
Nodeoperator= (const Node &)=delete
 

Private Attributes

const void * header_address_
 
const char * name_
 
size_t size_
 
Nodewrapper_node_ = nullptr
 
Detachedness detachedness_ = Detachedness::kUnknown
 
std::vector< std::unique_ptr< char[]> > named_edges_
 

Additional Inherited Members

- Public Types inherited from v8::EmbedderGraph::Node
enum class  Detachedness : uint8_t { kUnknown = 0 , kAttached = 1 , kDetached = 2 }
 

Detailed Description

Definition at line 38 of file cpp-snapshot.cc.

Constructor & Destructor Documentation

◆ EmbedderNode()

v8::internal::EmbedderNode::EmbedderNode ( const HeapObjectHeader * header_address,
cppgc::internal::HeapObjectName name,
size_t size )
inline

Definition at line 40 of file cpp-snapshot.cc.

◆ ~EmbedderNode()

v8::internal::EmbedderNode::~EmbedderNode ( )
overridedefault

Member Function Documentation

◆ GetAddress()

const void * v8::internal::EmbedderNode::GetAddress ( )
inlineoverridevirtual

Returns the address of the object in the embedder heap, or nullptr to not specify the address. If this address is provided, then V8 can generate consistent IDs for objects across subsequent heap snapshots, which allows devtools to determine which objects were retained from one snapshot to the next. This value is used only if GetNativeObject returns nullptr.

Reimplemented from v8::EmbedderGraph::Node.

Definition at line 79 of file cpp-snapshot.cc.

◆ GetDetachedness()

Detachedness v8::internal::EmbedderNode::GetDetachedness ( )
inlinefinalvirtual

Detachedness state of a given object. While unkown in general, there may be objects that specifically know their state. V8 passes this information along in the snapshot. Users of the snapshot may use it to annotate the object graph.

Reimplemented from v8::EmbedderGraph::Node.

Definition at line 67 of file cpp-snapshot.cc.

◆ InternalizeEdgeName()

const char * v8::internal::EmbedderNode::InternalizeEdgeName ( std::string edge_name)
inline

Definition at line 71 of file cpp-snapshot.cc.

Here is the caller graph for this function:

◆ Name()

const char * v8::internal::EmbedderNode::Name ( )
inlinefinalvirtual

Implements v8::EmbedderGraph::Node.

Definition at line 47 of file cpp-snapshot.cc.

◆ SetDetachedness()

void v8::internal::EmbedderNode::SetDetachedness ( Detachedness detachedness)
inline

Definition at line 64 of file cpp-snapshot.cc.

◆ SetWrapperNode()

void v8::internal::EmbedderNode::SetWrapperNode ( v8::EmbedderGraph::Node * wrapper_node)
inline

Definition at line 50 of file cpp-snapshot.cc.

◆ SizeInBytes()

size_t v8::internal::EmbedderNode::SizeInBytes ( )
inlinefinalvirtual

Implements v8::EmbedderGraph::Node.

Definition at line 48 of file cpp-snapshot.cc.

Here is the caller graph for this function:

◆ WrapperNode()

Node * v8::internal::EmbedderNode::WrapperNode ( )
inlinefinalvirtual

The corresponding V8 wrapper node if not null. During heap snapshot generation the embedder node and the V8 wrapper node will be merged into one node to simplify retaining paths.

Reimplemented from v8::EmbedderGraph::Node.

Definition at line 62 of file cpp-snapshot.cc.

Member Data Documentation

◆ detachedness_

Detachedness v8::internal::EmbedderNode::detachedness_ = Detachedness::kUnknown
private

Definition at line 86 of file cpp-snapshot.cc.

◆ header_address_

const void* v8::internal::EmbedderNode::header_address_
private

Definition at line 82 of file cpp-snapshot.cc.

◆ name_

const char* v8::internal::EmbedderNode::name_
private

Definition at line 83 of file cpp-snapshot.cc.

◆ named_edges_

std::vector<std::unique_ptr<char[]> > v8::internal::EmbedderNode::named_edges_
private

Definition at line 87 of file cpp-snapshot.cc.

◆ size_

size_t v8::internal::EmbedderNode::size_
private

Definition at line 84 of file cpp-snapshot.cc.

◆ wrapper_node_

Node* v8::internal::EmbedderNode::wrapper_node_ = nullptr
private

Definition at line 85 of file cpp-snapshot.cc.


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