v8 13.6.233 (node 24.1.0)
V8 is Google's open source JavaScript engine
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages Concepts
EmbedderRootsHandler Class Referenceabstract

#include <v8-embedder-heap.h>

Public Member Functions

virtual ~EmbedderRootsHandler ()=default
 
 EmbedderRootsHandler ()=default
 
virtual void ResetRoot (const v8::TracedReference< v8::Value > &handle)=0
 
virtual bool TryResetRoot (const v8::TracedReference< v8::Value > &handle)
 

Friends

class internal::TracedHandles
 

Detailed Description

Handler for embedder roots on non-unified heap garbage collections.

Definition at line 22 of file v8-embedder-heap.h.

Constructor & Destructor Documentation

◆ ~EmbedderRootsHandler()

virtual ~EmbedderRootsHandler ( )
virtualdefault

◆ EmbedderRootsHandler()

EmbedderRootsHandler ( )
default

Member Function Documentation

◆ ResetRoot()

virtual void ResetRoot ( const v8::TracedReference< v8::Value > & handle)
pure virtual

Used in combination with |IsRoot|. Called by V8 when an object that is backed by a handle is reclaimed by a non-tracing garbage collection. It is up to the embedder to reset the original handle.

Note that the |handle| is different from the handle that the embedder holds for retaining the object. It is up to the embedder to find the original handle via the object or class id.

◆ TryResetRoot()

virtual bool TryResetRoot ( const v8::TracedReference< v8::Value > & handle)
inlinevirtual

Similar to |ResetRoot()|, but opportunistic. The function is called in parallel for different handles and as such must be thread-safe. In case, |false| is returned, |ResetRoot()| will be recalled for the same handle.

Definition at line 44 of file v8-embedder-heap.h.

Friends And Related Symbol Documentation

◆ internal::TracedHandles

friend class internal::TracedHandles
friend

Definition at line 49 of file v8-embedder-heap.h.


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