v8  10.1.124 (node 18.2.0)
V8 is Google's open source JavaScript engine
TracedReferenceBase Class Reference

#include <v8-traced-handle.h>

Inheritance diagram for TracedReferenceBase:

Public Member Functions

bool IsEmpty () const
 
V8_INLINE void Reset ()
 
V8_INLINE v8::Local< v8::ValueGet (v8::Isolate *isolate) const
 
bool IsEmptyThreadSafe () const
 
V8_INLINE void SetWrapperClassId (uint16_t class_id)
 
V8_INLINE uint16_t WrapperClassId () const
 

Protected Member Functions

void SetSlotThreadSafe (void *new_val)
 
const void * GetSlotThreadSafe () const
 
V8_EXPORT void CheckValue () const
 

Protected Attributes

internal::Addressval_ = nullptr
 

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

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

Member Function Documentation

◆ CheckValue()

V8_EXPORT void CheckValue ( ) const
protected

◆ Get()

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

Construct a Local<Value> from this handle.

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

References TracedReferenceBase::IsEmpty(), HandleScope::Local, Local< T >::Local(), and TracedReferenceBase::val_.

◆ GetSlotThreadSafe()

const void* GetSlotThreadSafe ( ) const
inlineprotected

Get this reference in a thread-safe way

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

References TracedReferenceBase::val_.

Referenced by TracedReferenceBase::IsEmptyThreadSafe().

◆ IsEmpty()

bool IsEmpty ( ) const
inline

Returns true if the reference is empty, i.e., has not been assigned object.

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

References TracedReferenceBase::val_.

Referenced by TracedReferenceBase::Get(), TracedReferenceBase::Reset(), TracedReferenceBase::SetWrapperClassId(), and TracedReferenceBase::WrapperClassId().

◆ 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 84 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 460 of file v8-traced-handle.h.

References v8::internal::DisposeTracedGlobal(), TracedReferenceBase::IsEmpty(), TracedReferenceBase::SetSlotThreadSafe(), and TracedReferenceBase::val_.

◆ SetSlotThreadSafe()

void SetSlotThreadSafe ( void *  new_val)
inlineprotected

Update this reference in a thread-safe way.

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

References TracedReferenceBase::val_.

Referenced by TracedReferenceBase::Reset().

◆ SetWrapperClassId()

void SetWrapperClassId ( uint16_t  class_id)

Assigns a wrapper class ID to the handle.

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

References TracedReferenceBase::IsEmpty(), Internals::kNodeClassIdOffset, and TracedReferenceBase::val_.

◆ WrapperClassId()

uint16_t WrapperClassId ( ) const

Returns the class ID previously assigned to this handle or 0 if no class ID was previously assigned.

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

References TracedReferenceBase::IsEmpty(), Internals::kNodeClassIdOffset, and TracedReferenceBase::val_.

Friends And Related Function Documentation

◆ internal::BasicTracedReferenceExtractor

friend class internal::BasicTracedReferenceExtractor
friend

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

◆ Local

friend class Local
friend

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

◆ operator== [1/2]

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

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

◆ operator== [2/2]

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

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

Referenced by v8::operator!=().

Field Documentation

◆ val_


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