v8
3.11.10 (node 0.8.28)
V8 is Google's open source JavaScript engine
|
#include <v8.h>
Public Member Functions | |
Persistent () | |
template<class S > | |
Persistent (Persistent< S > that) | |
template<class S > | |
Persistent (S *that) | |
template<class S > | |
Persistent (Handle< S > that) | |
template<class S > | |
Persistent< S > | As () |
void | Dispose () |
void | MakeWeak (void *parameters, WeakReferenceCallback callback) |
void | ClearWeak () |
void | MarkIndependent () |
bool | IsNearDeath () const |
bool | IsWeak () const |
void | SetWrapperClassId (uint16_t class_id) |
Public Member Functions inherited from Handle< T > | |
Handle () | |
Handle (T *val) | |
template<class S > | |
Handle (Handle< S > that) | |
bool | IsEmpty () const |
void | Clear () |
T * | operator-> () const |
T * | operator* () const |
template<class S > | |
bool | operator== (Handle< S > that) const |
template<class S > | |
bool | operator!= (Handle< S > that) const |
template<class S > | |
Handle< S > | As () |
Static Public Member Functions | |
template<class S > | |
static Persistent< T > | Cast (Persistent< S > that) |
static Persistent< T > | New (Handle< T > that) |
Static Public Member Functions inherited from Handle< T > | |
template<class S > | |
static Handle< T > | Cast (Handle< S > that) |
Friends | |
class | ImplementationUtilities |
class | ObjectTemplate |
An object reference that is independent of any handle scope. Where a Local handle only lives as long as the HandleScope in which it was allocated, a Persistent handle remains valid until it is explicitly disposed.
A persistent handle contains a reference to a storage cell within the v8 engine which holds an object value and which is updated by the garbage collector whenever the object is moved. A new storage cell can be created using Persistent::New and existing handles can be disposed using Persistent::Dispose. Since persistent handles are passed by value you may have many persistent handle objects that point to the same storage cell. For instance, if you pass a persistent handle as an argument to a function you will not get two different storage cells but rather two references to the same storage cell.
|
inline |
Creates an empty persistent handle that doesn't point to any storage cell.
Definition at line 4072 of file v8.h.
References V8::Handle.
|
inline |
Creates a persistent handle for the same storage cell as the specified handle. This constructor allows you to pass persistent handles as arguments by value and to assign between persistent handles. However, attempting to assign between incompatible persistent handles, for instance from a Persistent<String> to a Persistent<Number> will cause a compile-time error. Assigning between compatible persistent handles, for instance assigning a Persistent<String> to a variable declared as Persistent<Value>, is allowed as String is a subclass of Value.
This check fails when trying to convert between incompatible handles. For example, converting from a Handle<String> to a Handle<Number>.
Definition at line 338 of file v8.h.
References V8::Handle.
|
inline |
Definition at line 348 of file v8.h.
References V8::Handle.
|
inlineexplicit |
"Casts" a plain handle which is known to be a persistent handle to a persistent handle.
Definition at line 354 of file v8.h.
References V8::Handle.
|
inline |
Definition at line 366 of file v8.h.
References V8::Persistent.
|
inlinestatic |
Definition at line 357 of file v8.h.
References V8::Persistent.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Marks the reference to this object independent. Garbage collector is free to ignore any object groups containing this object. Weak callback for an independent handle should not assume that it will be preceded by a global GC prologue callback or followed by a global GC epilogue callback.
|
inlinestatic |
Creates a new persistent handle for an existing local or persistent handle.
Definition at line 4043 of file v8.h.
References V8::Persistent.
|
inline |
Assigns a wrapper class ID to the handle. See RetainedObjectInfo interface description in v8-profiler.h for details.
|
friend |