v8
7.9.317 (node 13.2.0)
V8 is Google's open source JavaScript engine
|
#include <v8.h>
Public Member Functions | |
bool | IsEmpty () const |
V8_INLINE void | Reset () |
Local< T > | Get (Isolate *isolate) const |
template<class S > | |
V8_INLINE bool | operator== (const TracedReferenceBase< S > &that) const |
template<class S > | |
V8_INLINE bool | operator== (const Local< S > &that) const |
template<class S > | |
V8_INLINE bool | operator!= (const TracedReferenceBase< 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 > | |
V8_INLINE TracedReferenceBase< S > & | As () const |
Friends | |
class | EmbedderHeapTracer |
template<typename F > | |
class | Local |
class | Object |
template<typename F > | |
class | TracedGlobal |
template<typename F > | |
class | TracedReference |
template<typename F > | |
class | ReturnValue |
A traced handle with copy and move semantics. The handle is to be used together with |v8::EmbedderHeapTracer| and specifies edges from the embedder into V8's heap.
The exact semantics are:
Note that the base class cannot be instantiated itself. Choose from
|
inline |
Definition at line 900 of file v8.h.
References Local< T >::TracedReferenceBase.
Construct a Local<T> from this handle.
Definition at line 845 of file v8.h.
References Local< T >::Local.
|
inline |
Returns true if this TracedReferenceBase is empty, i.e., has not been assigned an object.
Definition at line 834 of file v8.h.
Referenced by TracedReferenceBase< T >::Reset(), TracedReferenceBase< T >::SetWrapperClassId(), and TracedReferenceBase< T >::WrapperClassId().
|
inline |
|
inline |
void Reset |
If non-empty, destroy the underlying storage cell. |IsEmpty| will return true after this call.
Definition at line 10379 of file v8.h.
References TracedReferenceBase< T >::IsEmpty().
void 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 SetWrapperClassId | ( | uint16_t | class_id | ) |
Assigns a wrapper class ID to the handle.
Definition at line 10495 of file v8.h.
References TracedReferenceBase< T >::IsEmpty(), and Internals::kNodeClassIdOffset.
uint16_t WrapperClassId |
Returns the class ID previously assigned to this handle or 0 if no class ID was previously assigned.
Definition at line 10504 of file v8.h.
References TracedReferenceBase< T >::IsEmpty(), and Internals::kNodeClassIdOffset.
|
friend |
|
friend |
|
friend |
|
friend |