v8 12.4.254 (node 22.4.1)
V8 is Google's open source JavaScript engine
Loading...
Searching...
No Matches
TracedReferenceBase Class Reference

#include <v8-traced-handle.h>

Inheritance diagram for TracedReferenceBase:
Collaboration diagram for TracedReferenceBase:

Public Member Functions

V8_INLINE void Reset ()
 
V8_INLINE Local< ValueGet (Isolate *isolate) const
 
bool IsEmptyThreadSafe () const
 
- Public Member Functions inherited from IndirectHandleBase
V8_INLINE bool IsEmpty () const
 
V8_INLINE void Clear ()
 

Protected Member Functions

V8_INLINE TracedReferenceBase ()=default
 
void SetSlotThreadSafe (void *new_val)
 
const void * GetSlotThreadSafe () const
 
V8_EXPORT void CheckValue () const
 
- Protected Member Functions inherited from IndirectHandleBase
V8_INLINE IndirectHandleBase ()=default
 
V8_INLINE IndirectHandleBase (const IndirectHandleBase &other)=default
 
V8_INLINE IndirectHandleBaseoperator= (const IndirectHandleBase &that)=default
 
V8_INLINE IndirectHandleBase (internal::Address *location)
 
V8_INLINE internal::Address ptr () const
 
V8_INLINE internal::Address *const & slot () const
 
V8_INLINE internal::Address *& slot ()
 
template<typename T , bool check_null = false>
V8_INLINE T * value () const
 

Friends

class internal::BasicTracedReferenceExtractor
 
template<typename F >
class Local
 
template<typename U >
bool operator== (const TracedReferenceBase &, const Local< U > &)
 
bool operator== (const TracedReferenceBase &, const TracedReferenceBase &)
 

Detailed Description

An indirect handle, where the indirect pointer points to a GlobalHandles node.

Definition at line 56 of file v8-traced-handle.h.

Constructor & Destructor Documentation

◆ TracedReferenceBase()

V8_INLINE TracedReferenceBase ( )
protecteddefault

Member Function Documentation

◆ CheckValue()

V8_EXPORT void CheckValue ( ) const
protected

◆ Get()

V8_INLINE Local< Value > Get ( Isolate isolate) const
inline

Construct a Local<Value> from this handle.

Definition at line 67 of file v8-traced-handle.h.

References IndirectHandleBase::IsEmpty(), and Local< T >::New().

◆ GetSlotThreadSafe()

const void * GetSlotThreadSafe ( ) const
inlineprotected

Get this reference in a thread-safe way

Definition at line 94 of file v8-traced-handle.h.

References IndirectHandleBase::slot().

Referenced by TracedReferenceBase::IsEmptyThreadSafe().

◆ IsEmptyThreadSafe()

bool IsEmptyThreadSafe ( ) const
inline

Returns true if this TracedReference is empty, i.e., has not been assigned an object. This version of IsEmpty is thread-safe.

Definition at line 76 of file v8-traced-handle.h.

References TracedReferenceBase::GetSlotThreadSafe().

Referenced by JSVisitor::Trace().

◆ Reset()

void Reset ( )

If non-empty, destroy the underlying storage cell. |IsEmpty| will return true after this call.

Definition at line 321 of file v8-traced-handle.h.

References v8::internal::DisposeTracedReference(), IndirectHandleBase::IsEmpty(), TracedReferenceBase::SetSlotThreadSafe(), IndirectHandleBase::slot(), and V8_UNLIKELY.

◆ SetSlotThreadSafe()

void SetSlotThreadSafe ( void *  new_val)
inlineprotected

Update this reference in a thread-safe way.

Definition at line 86 of file v8-traced-handle.h.

References IndirectHandleBase::slot().

Referenced by TracedReferenceBase::Reset().

Friends And Related Symbol Documentation

◆ internal::BasicTracedReferenceExtractor

friend class internal::BasicTracedReferenceExtractor
friend

Definition at line 101 of file v8-traced-handle.h.

◆ Local

template<typename F >
friend class Local
friend

Definition at line 103 of file v8-traced-handle.h.

◆ operator== [1/2]

template<typename U >
bool operator== ( const TracedReferenceBase lhs,
const Local< U > &  rhs 
)
friend

Definition at line 335 of file v8-traced-handle.h.

◆ operator== [2/2]

bool operator== ( const TracedReferenceBase lhs,
const TracedReferenceBase rhs 
)
friend

Definition at line 329 of file v8-traced-handle.h.


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