v8
8.1.307(node14.1.0)
V8 is Google's open source JavaScript engine
|
#include <v8.h>
Public Member Functions | |
virtual | ~MeasureMemoryDelegate ()=default |
virtual bool | ShouldMeasure (Local< Context > context)=0 |
virtual void | MeasurementComplete (const std::vector< std::pair< Local< Context >, size_t >> &context_sizes_in_bytes, size_t unattributed_size_in_bytes)=0 |
Static Public Member Functions | |
static std::unique_ptr< MeasureMemoryDelegate > | Default (Isolate *isolate, Local< Context > context, Local< Promise::Resolver > promise_resolver, MeasureMemoryMode mode) |
The delegate is used in Isolate::MeasureMemory API.
It specifies the contexts that need to be measured and gets called when the measurement is completed to report the results.
|
virtualdefault |
|
static |
Returns a default delegate that resolves the given promise when the memory measurement completes.
isolate | the current isolate |
context | the current context |
promise_resolver | the promise resolver that is given the result of the memory measurement. |
mode | the detail level of the result. |
|
pure virtual |
This function is called when memory measurement finishes.
context_sizes_in_bytes | a vector of (context, size) pairs that includes each context for which ShouldMeasure returned true and that was not garbage collected while the memory measurement was in progress. |
unattributed_size_in_bytes | total size of objects that were not attributed to any context (i.e. are likely shared objects). |
Returns true if the size of the given context needs to be measured.