![]() |
My Project
V8 API Reference Guide generated from the header files
|
#include <v8.h>
Public Member Functions | |
| TracedGlobal ()=default | |
| template<class S > | |
| TracedGlobal (Isolate *isolate, Local< S > that) | |
| V8_INLINE | TracedGlobal (TracedGlobal &&other) |
| template<class S > | |
| V8_INLINE TracedGlobal & | operator= (TracedGlobal< S > &&rhs) |
| TracedGlobal (const TracedGlobal &)=delete | |
| void | operator= (const TracedGlobal &)=delete |
| bool | IsEmpty () const |
| V8_INLINE void | Reset () |
| template<class S > | |
| V8_INLINE void | Reset (Isolate *isolate, const Local< S > &other) |
| Local< T > | Get (Isolate *isolate) const |
| template<class S > | |
| V8_INLINE TracedGlobal< S > & | As () const |
| template<class S > | |
| V8_INLINE bool | operator== (const TracedGlobal< S > &that) const |
| template<class S > | |
| V8_INLINE bool | operator== (const Local< S > &that) const |
| template<class S > | |
| V8_INLINE bool | operator!= (const TracedGlobal< S > &that) const |
| template<class S > | |
| V8_INLINE bool | operator!= (const Local< S > &that) const |
| V8_INLINE void | SetWrapperClassId (uint16_t class_id) |
| V8_INLINE uint16_t | WrapperClassId () const |
| V8_INLINE void | SetFinalizationCallback (void *parameter, WeakCallbackInfo< void >::Callback callback) |
| template<class S > | |
| void | Reset (Isolate *isolate, const Local< S > &other) |
| template<class S > | |
| TracedGlobal< T > & | operator= (TracedGlobal< S > &&rhs) |
Friends | |
| class | EmbedderHeapTracer |
| template<typename F > | |
| class | Local |
| class | Object |
| template<typename F > | |
| class | ReturnValue |
A traced handle with move semantics, similar to std::unique_ptr. The handle is to be used together with |v8::EmbedderHeapTracer| and specifies edges from the embedder into V8's heap.
The exact semantics are:
|
default |
An empty TracedGlobal without storage cell.
|
inline |
Construct a TracedGlobal from a Local.
When the Local is non-empty, a new storage cell is created pointing to the same object.
| v8::TracedGlobal< T >::TracedGlobal | ( | TracedGlobal< T > && | other | ) |
Move constructor initializing TracedGlobal from an existing one.
|
delete |
TracedGlobal only supports move semantics and forbids copying.
|
inline |
Construct a Local<T> from this handle.
|
inline |
Returns true if this TracedGlobal is empty, i.e., has not been assigned an object.
| V8_INLINE TracedGlobal& v8::TracedGlobal< T >::operator= | ( | TracedGlobal< S > && | rhs | ) |
Move assignment operator initializing TracedGlobal from an existing one.
| void v8::TracedGlobal< T >::Reset | ( | ) |
If non-empty, destroy the underlying storage cell. |IsEmpty| will return true after this call.
| V8_INLINE void v8::TracedGlobal< T >::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
| void v8::TracedGlobal< T >::SetFinalizationCallback | ( | void * | parameter, |
| WeakCallbackInfo< void >::Callback | callback | ||
| ) |
Adds a finalization callback to the handle. The type of this callback is similar to WeakCallbackType::kInternalFields, i.e., it will pass the parameter and the first two internal fields of the object.
The callback is then supposed to reset the handle in the callback. No further V8 API may be called in this callback. In case additional work involving V8 needs to be done, a second callback can be scheduled using WeakCallbackInfo<void>::SetSecondPassCallback.
| void v8::TracedGlobal< T >::SetWrapperClassId | ( | uint16_t | class_id | ) |
Assigns a wrapper class ID to the handle.
| uint16_t v8::TracedGlobal< T >::WrapperClassId | ( | ) | const |
Returns the class ID previously assigned to this handle or 0 if no class ID was previously assigned.
1.8.15