![]() |
v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
|
Classes | |
struct | Edge |
class | V8NodeImpl |
Public Member Functions | |
Node * | V8Node (const v8::Local< v8::Value > &value) final |
Node * | V8Node (const v8::Local< v8::Data > &data) final |
Node * | AddNode (std::unique_ptr< Node > node) final |
void | AddEdge (Node *from, Node *to, const char *name) final |
void | AddNativeSize (size_t size) final |
size_t | native_size () const |
const std::vector< std::unique_ptr< Node > > & | nodes () |
const std::vector< Edge > & | edges () |
![]() | |
virtual | ~EmbedderGraph ()=default |
Private Attributes | |
std::vector< std::unique_ptr< Node > > | nodes_ |
std::vector< Edge > | edges_ |
size_t | native_size_ = 0 |
Definition at line 2969 of file heap-snapshot-generator.cc.
|
inlinefinalvirtual |
Adds an edge that represents a strong reference from the given node |from| to the given node |to|. The nodes must be added to the graph before calling this function.
If name is nullptr, the edge will have auto-increment indexes, otherwise it will be named accordingly.
Implements v8::EmbedderGraph.
Definition at line 3014 of file heap-snapshot-generator.cc.
|
inlinefinalvirtual |
Adds a count of bytes that are not associated with any particular Node. An embedder may use this to represent the size of nodes which were omitted from this EmbedderGraph despite being retained by the graph, or other overhead costs. This number will contribute to the total size in a heap snapshot, without being represented in the object graph.
Reimplemented from v8::EmbedderGraph.
Definition at line 3018 of file heap-snapshot-generator.cc.
Adds the given node to the graph and takes ownership of the node. Returns a raw pointer to the node that is valid while the graph is alive.
Implements v8::EmbedderGraph.
Definition at line 3008 of file heap-snapshot-generator.cc.
|
inline |
Definition at line 3022 of file heap-snapshot-generator.cc.
|
inline |
Definition at line 3019 of file heap-snapshot-generator.cc.
|
inline |
Definition at line 3021 of file heap-snapshot-generator.cc.
|
inlinefinalvirtual |
Returns a node corresponding to the given V8 value. Ownership is not transferred. The result pointer is valid while the graph is alive.
For API compatibility, this default implementation just checks that the data is a v8::Value and forward it to the variant that takes v8::Value, which is currently required to be implemented. In the future we'll remove the v8::Value variant, and make this variant that takes v8::Data abstract instead. If the embedder subclasses v8::EmbedderGraph and also use v8::TracedReference<v8::Data>, they must override this variant.
Reimplemented from v8::EmbedderGraph.
Definition at line 3002 of file heap-snapshot-generator.cc.
|
inlinefinalvirtual |
Returns a node corresponding to the given V8 value. Ownership is not transferred. The result pointer is valid while the graph is alive.
For now the variant that takes v8::Data is not marked as abstract for compatibility, but embedders who subclass EmbedderGraph are expected to implement it. Then in the implementation of the variant that takes v8::Value, they can simply forward the call to the one that takes v8::Local<v8::Data>.
Implements v8::EmbedderGraph.
Definition at line 2997 of file heap-snapshot-generator.cc.
|
private |
Definition at line 3026 of file heap-snapshot-generator.cc.
|
private |
Definition at line 3027 of file heap-snapshot-generator.cc.
|
private |
Definition at line 3025 of file heap-snapshot-generator.cc.