V8 Project
|
A PersistentBase which allows copy and assignment. More...
#include <v8.h>
Public Member Functions | |
Persistent () | |
A Persistent with no storage cell. More... | |
template<class S > | |
Persistent (Isolate *isolate, Handle< S > that) | |
Construct a Persistent from a Handle. More... | |
template<class S , class M2 > | |
Persistent (Isolate *isolate, const Persistent< S, M2 > &that) | |
Construct a Persistent from a Persistent. More... | |
Persistent (const Persistent &that) | |
The copy constructors and assignment operator create a Persistent exactly as the Persistent constructor, but the Copy function from the traits class is called, allowing the setting of flags based on the copied Persistent. More... | |
template<class S , class M2 > | |
Persistent (const Persistent< S, M2 > &that) | |
Persistent & | operator= (const Persistent &that) |
template<class S , class M2 > | |
Persistent & | operator= (const Persistent< S, M2 > &that) |
~Persistent () | |
The destructor will dispose the Persistent based on the kResetInDestructor flags in the traits class. More... | |
template<class S > | |
Persistent< S > & | As () |
T * | ClearAndLeak () |
![]() | |
void | Reset () |
If non-empty, destroy the underlying storage cell IsEmpty() will return true after this call. More... | |
template<class S > | |
void | Reset (Isolate *isolate, const Handle< 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. More... | |
template<class S > | |
void | Reset (Isolate *isolate, const PersistentBase< 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. More... | |
bool | IsEmpty () const |
template<class S > | |
bool | operator== (const PersistentBase< S > &that) const |
template<class S > | |
bool | operator== (const Handle< S > &that) const |
template<class S > | |
bool | operator!= (const PersistentBase< S > &that) const |
template<class S > | |
bool | operator!= (const Handle< S > &that) const |
template<typename P > | |
void | SetWeak (P *parameter, typename WeakCallbackData< T, P >::Callback callback) |
Install a finalization callback on this object. More... | |
template<typename S , typename P > | |
void | SetWeak (P *parameter, typename WeakCallbackData< S, P >::Callback callback) |
template<typename P > | |
P * | ClearWeak () |
void | ClearWeak () |
void | MarkIndependent () |
Marks the reference to this object independent. More... | |
void | MarkPartiallyDependent () |
Marks the reference to this object partially dependent. More... | |
bool | IsIndependent () const |
bool | IsNearDeath () const |
Checks if the handle holds the only reference to an object. More... | |
bool | IsWeak () const |
Returns true if the handle's reference is weak. More... | |
void | SetWrapperClassId (uint16_t class_id) |
Assigns a wrapper class ID to the handle. More... | |
uint16_t | WrapperClassId () const |
Returns the class ID previously assigned to this handle or 0 if no class ID was previously assigned. More... | |
Static Public Member Functions | |
template<class S > | |
static Persistent< T > & | Cast (Persistent< S > &that) |
Private Member Functions | |
template<class S > | |
Persistent (S *that) | |
T * | operator* () const |
template<class S , class M2 > | |
void | Copy (const Persistent< S, M2 > &that) |
Friends | |
class | Isolate |
class | Utils |
template<class F > | |
class | Handle |
template<class F > | |
class | Local |
template<class F1 , class F2 > | |
class | Persistent |
template<class F > | |
class | ReturnValue |
A PersistentBase which allows copy and assignment.
Copy, assignment and destructor bevavior is controlled by the traits class M.
Note: Persistent class hierarchy is subject to future changes.
|
inline |
A Persistent with no storage cell.
|
inline |
Construct a Persistent from a Handle.
When the Handle is non-empty, a new storage cell is created pointing to the same object, and no flags are set.
Definition at line 638 of file v8.h.
References S, T, and TYPE_CHECK.
|
inline |
Construct a Persistent from a Persistent.
When the Persistent is non-empty, a new storage cell is created pointing to the same object, and no flags are set.
Definition at line 648 of file v8.h.
References S, T, and TYPE_CHECK.
|
inline |
The copy constructors and assignment operator create a Persistent exactly as the Persistent constructor, but the Copy function from the traits class is called, allowing the setting of flags based on the copied Persistent.
Definition at line 658 of file v8.h.
References v8::Persistent< T, M >::Copy().
|
inline |
Definition at line 662 of file v8.h.
References v8::Persistent< T, M >::Copy().
|
inline |
The destructor will dispose the Persistent based on the kResetInDestructor flags in the traits class.
Since not calling dispose can result in a memory leak, it is recommended to always set this flag.
Definition at line 679 of file v8.h.
References v8::PersistentBase< T >::Reset().
|
inlineprivate |
|
inline |
Definition at line 695 of file v8.h.
References v8::Persistent< T, M >::Cast().
|
inlinestatic |
Definition at line 685 of file v8.h.
References v8::PersistentBase< T >::IsEmpty().
Referenced by v8::Persistent< T, M >::As().
|
inline |
Definition at line 6161 of file v8.h.
|
inlineprivate |
Definition at line 6042 of file v8.h.
References v8::V8::CopyPersistent(), v8::PersistentBase< T >::IsEmpty(), S, T, TYPE_CHECK, and v8::PersistentBase< T >::val_.
Referenced by v8::Persistent< T, M >::operator=(), and v8::Persistent< T, M >::Persistent().
|
inlineprivate |
|
inline |
Definition at line 665 of file v8.h.
References v8::Persistent< T, M >::Copy().
|
inline |
Definition at line 670 of file v8.h.
References v8::Persistent< T, M >::Copy().