V8 API Reference Guide generated from the header files
|
#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 *> > &embedder_fields)=0 |
virtual void | TracePrologue ()=0 |
virtual bool | AdvanceTracing (double deadline_in_ms, AdvanceTracingActions actions)=0 |
virtual bool | IsTracingDone () |
virtual void | TraceEpilogue ()=0 |
virtual void | EnterFinalPause ()=0 |
virtual void | AbortTracing ()=0 |
void | FinalizeTracing () |
v8::Isolate * | isolate () const |
V8_DEPRECATE_SOON ("Use IsTracingDone", virtual size_t NumberOfWrappersToTrace() { return 0;}) | |
Protected Attributes | |
v8::Isolate * | isolate_ = nullptr |
Friends | |
class | internal::LocalEmbedderHeapTracer |
Interface for tracing through the embedder heap. During a 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 JavaScript 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.
|
pure virtual |
Called when tracing is aborted.
The embedder is expected to throw away all intermediate data and reset to the initial state.
|
pure virtual |
Called to to make a tracing step in the embedder.
The embedder is expected to trace its heap starting from wrappers reported by RegisterV8References method, and report back all reachable wrappers. Furthermore, the embedder is expected to stop tracing by the given deadline.
Returns true if there is still work to do.
|
pure virtual |
Called upon entering the final marking pause. No more incremental marking steps will follow this call.
|
pure virtual |
Called by v8 to register internal fields of found wrappers.
The embedder is expected to store them somewhere and trace reachable wrappers from them when called through |AdvanceTracing|.
|
pure virtual |
Called at the end of a GC cycle.
Note that allocation is not allowed within |TraceEpilogue|.
|
pure virtual |
Called at the beginning of a GC cycle.
v8::EmbedderHeapTracer::V8_DEPRECATE_SOON | ( | "Use IsTracingDone" | , |
virtual size_t NumberOfWrappersToTrace() { return 0;} | |||
) |
Returns the number of wrappers that are still to be traced by the embedder.