v8  3.25.30(node0.11.13)
V8 is Google's open source JavaScript engine
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
HandleScope Class Reference

#include <v8.h>

Inheritance diagram for HandleScope:

Public Member Functions

 HandleScope (Isolate *isolate)
 
 ~HandleScope ()
 
V8_INLINE IsolateGetIsolate () const
 

Static Public Member Functions

static int NumberOfHandles (Isolate *isolate)
 

Protected Member Functions

V8_INLINE HandleScope ()
 
void Initialize (Isolate *isolate)
 

Static Protected Member Functions

static internal::Object ** CreateHandle (internal::Isolate *isolate, internal::Object *value)
 

Friends

template<class F >
class Local
 
class Object
 
class Context
 

Detailed Description

A stack-allocated class that governs a number of local handles. After a handle scope has been created, all local handles will be allocated within that handle scope until either the handle scope is deleted or another handle scope is created. If there is already a handle scope and a new one is created, all allocations will take place in the new handle scope until it is deleted. After that, new handles will again be allocated in the original handle scope.

After the handle scope of a local handle has been deleted the garbage collector will no longer track the object stored in the handle and may deallocate it. The behavior of accessing a handle for which the handle scope has been deleted is undefined.

Definition at line 829 of file v8.h.

Constructor & Destructor Documentation

HandleScope ( Isolate isolate)

Definition at line 584 of file api.cc.

References HandleScope::Initialize().

Definition at line 606 of file api.cc.

V8_INLINE HandleScope ( )
inlineprotected

Definition at line 845 of file v8.h.

Member Function Documentation

i::Object ** CreateHandle ( internal::Isolate isolate,
internal::Object value 
)
staticprotected
V8_INLINE Isolate* GetIsolate ( ) const
inline

Definition at line 840 of file v8.h.

int NumberOfHandles ( Isolate isolate)
static

Counts the number of allocated handles.

Definition at line 611 of file api.cc.

References HandleScope::NumberOfHandles().

Referenced by THREADED_TEST().

Friends And Related Function Documentation

friend class Context
friend

Definition at line 874 of file v8.h.

friend class Local
friend

Definition at line 869 of file v8.h.

friend class Object
friend

Definition at line 873 of file v8.h.


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