V8: v8::MeasureMemoryDelegate Class Reference (original) (raw)

#include <[v8-statistics.h](v8-statistics%5F8h%5Fsource.html)>

Public Member Functions
virtual ~MeasureMemoryDelegate ()=default
virtual bool ShouldMeasure (Local< Context > context)=0
virtual void MeasurementComplete (Result result)

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.

Both MeasurementComplete() callbacks will be invoked on completion. Each implementation of this class should hence implement only one of them, and leave the other empty.

virtual v8::MeasureMemoryDelegate::~MeasureMemoryDelegate ( ) virtualdefault

Default()

Returns a default delegate that resolves the given promise when the memory measurement completes.

Parameters

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.

MeasurementComplete()

virtual void v8::MeasureMemoryDelegate::MeasurementComplete ( Result result) inlinevirtual

This function is called when memory measurement finishes.

Parameters

result the result of the measurement.

ShouldMeasure()

virtual bool v8::MeasureMemoryDelegate::ShouldMeasure ( Local< Context > context) pure virtual

Returns true if the size of the given context needs to be measured.


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