v8 10.2.154 (node 18.16.0)
V8 is Google's open source JavaScript engine
Loading...
Searching...
No Matches
TracedReference< T > Class Template Reference

#include <v8-traced-handle.h>

Inheritance diagram for TracedReference< T >:
Collaboration diagram for TracedReference< T >:

Public Member Functions

 TracedReference ()
 
template<class S >
 TracedReference (Isolate *isolate, Local< S > that)
 
V8_INLINE TracedReference (TracedReference &&other) noexcept
 
template<typename S >
V8_INLINE TracedReference (TracedReference< S > &&other) noexcept
 
V8_INLINE TracedReference (const TracedReference &other)
 
template<typename S >
V8_INLINE TracedReference (const TracedReference< S > &other)
 
V8_INLINE TracedReferenceoperator= (TracedReference &&rhs) noexcept
 
template<class S >
V8_INLINE TracedReferenceoperator= (TracedReference< S > &&rhs) noexcept
 
V8_INLINE TracedReferenceoperator= (const TracedReference &rhs)
 
template<class S >
V8_INLINE TracedReferenceoperator= (const TracedReference< S > &rhs)
 
template<class S >
V8_INLINE void Reset (Isolate *isolate, const Local< S > &other)
 
template<class S >
V8_INLINE TracedReference< S > & As () const
 
template<class S >
void Reset (Isolate *isolate, const Local< S > &other)
 
template<class S >
TracedReference< T > & operator= (TracedReference< S > &&rhs) noexcept
 
template<class S >
TracedReference< T > & operator= (const TracedReference< S > &rhs)
 
- Public Member Functions inherited from BasicTracedReference< T >
Local< T > Get (Isolate *isolate) const
 
template<class S >
V8_INLINE BasicTracedReference< S > & As () const
 
T * operator-> () const
 
T * operator* () const
 
- Public Member Functions inherited from TracedReferenceBase
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
 

Additional Inherited Members

- Protected Member Functions inherited from TracedReferenceBase
void SetSlotThreadSafe (void *new_val)
 
const void * GetSlotThreadSafe () const
 
V8_EXPORT void CheckValue () const
 
- Protected Attributes inherited from TracedReferenceBase
internal::Addressval_ = nullptr
 

Detailed Description

template<typename T>
class v8::TracedReference< T >

A traced handle without destructor that clears the handle. The embedder needs to ensure that the handle is not accessed once the V8 object has been reclaimed. This can happen when the handle is not passed through the EmbedderHeapTracer. For more details see BasicTracedReference.

The reference assumes the embedder has precise knowledge about references at all times. In case V8 needs to separately handle on-stack references, the embedder is required to set the stack start through |EmbedderHeapTracer::SetStackStart|.

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

Constructor & Destructor Documentation

◆ TracedReference() [1/6]

template<typename T >
TracedReference ( )
inline

An empty TracedReference without storage cell.

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

◆ TracedReference() [2/6]

template<typename T >
template<class S >
TracedReference ( Isolate isolate,
Local< S >  that 
)
inline

Construct a TracedReference from a Local.

When the Local is non-empty, a new storage cell is created pointing to the same object.

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

References v8::internal::kInitializingStore, and TracedReferenceBase::val_.

◆ TracedReference() [3/6]

template<typename T >
V8_INLINE TracedReference ( TracedReference< T > &&  other)
inlinenoexcept

Move constructor initializing TracedReference from an existing one.

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

◆ TracedReference() [4/6]

template<typename T >
template<typename S >
V8_INLINE TracedReference ( TracedReference< S > &&  other)
inlinenoexcept

Move constructor initializing TracedReference from an existing one.

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

◆ TracedReference() [5/6]

template<typename T >
V8_INLINE TracedReference ( const TracedReference< T > &  other)
inline

Copy constructor initializing TracedReference from an existing one.

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

◆ TracedReference() [6/6]

template<typename T >
template<typename S >
V8_INLINE TracedReference ( const TracedReference< S > &  other)
inline

Copy constructor initializing TracedReference from an existing one.

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

Member Function Documentation

◆ As()

template<typename T >
template<class S >
V8_INLINE TracedReference< S > & As ( ) const
inline

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

◆ operator=() [1/6]

template<class T >
TracedReference< T > & operator= ( const TracedReference< T > &  rhs)

Copy assignment operator initializing TracedReference from an existing one.

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

References v8::internal::CopyTracedReference(), and TracedReferenceBase::val_.

◆ operator=() [2/6]

template<typename T >
template<class S >
V8_INLINE TracedReference & operator= ( const TracedReference< S > &  rhs)

Copy assignment operator initializing TracedReference from an existing one.

◆ operator=() [3/6]

template<typename T >
template<class S >
TracedReference< T > & operator= ( const TracedReference< S > &  rhs)

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

◆ operator=() [4/6]

template<class T >
TracedReference< T > & operator= ( TracedReference< T > &&  rhs)
noexcept

Move assignment operator initializing TracedReference from an existing one.

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

References v8::internal::MoveTracedReference().

◆ operator=() [5/6]

template<typename T >
template<class S >
V8_INLINE TracedReference & operator= ( TracedReference< S > &&  rhs)
noexcept

Move assignment operator initializing TracedReference from an existing one.

◆ operator=() [6/6]

template<typename T >
template<class S >
TracedReference< T > & operator= ( TracedReference< S > &&  rhs)
noexcept

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

◆ Reset() [1/2]

template<typename T >
template<class S >
V8_INLINE void Reset ( Isolate isolate,
const Local< S > &  other 
)

If non-empty, destroy the underlying storage cell and create a new one with the contents of other if other is non empty

◆ Reset() [2/2]

template<typename T >
template<class S >
void Reset ( Isolate isolate,
const Local< S > &  other 
)

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

References Local< T >::IsEmpty(), and v8::internal::kAssigningStore.


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