v8
5.5.372 (node 7.10.1)
V8 is Google's open source JavaScript engine
|
#include <v8.h>
Data Structures | |
struct | AdvanceTracingActions |
Public Types | |
enum | ForceCompletionAction { FORCE_COMPLETION , DO_NOT_FORCE_COMPLETION } |
Public Member Functions | |
virtual void | RegisterV8References (const std::vector< std::pair< void *, void * > > &internal_fields)=0 |
virtual void | TracePrologue () |
virtual void | TracePrologue (EmbedderReachableReferenceReporter *reporter) |
virtual bool | AdvanceTracing (double deadline_in_ms, AdvanceTracingActions actions)=0 |
virtual void | TraceEpilogue ()=0 |
virtual void | EnterFinalPause () |
virtual void | AbortTracing () |
virtual size_t | NumberOfWrappersToTrace () |
Protected Member Functions | |
virtual | ~EmbedderHeapTracer ()=default |
Interface for tracing through the embedder heap. During the v8 garbage collection, v8 collects hidden fields of all potential wrappers, and at the end of its marking phase iterates the collection and asks the embedder to trace through its heap and use reporter to report each js object reachable from any of the given wrappers.
Before the first call to the TraceWrappersFrom function TracePrologue will be called. When the garbage collection cycle is finished, TraceEpilogue will be called.
|
protectedvirtualdefault |
|
inlinevirtual |
|
pure virtual |
Embedder is expected to trace its heap starting from wrappers reported by RegisterV8References method, and use reporter for all reachable wrappers. Embedder is expected to stop tracing by the given deadline.
Returns true if there is still work to do.
|
inlinevirtual |
|
inlinevirtual |
|
pure virtual |
V8 will call this method with internal fields of found wrappers. The embedder is expected to store them in its marking deque and trace reachable wrappers from them when called through |AdvanceTracing|.
|
pure virtual |
V8 will call this method at the end of a GC cycle.
Note that allocation is not allowed within |TraceEpilogue|.
|
inlinevirtual |
|
inlinevirtual |
V8 will call this method at the beginning of a GC cycle. Embedder is expected to use EmbedderReachableReferenceReporter for reporting all reachable v8 objects.