v8
3.14.5(node0.10.28)
V8 is Google's open source JavaScript engine
|
#include <v8.h>
Public Member Functions | |
HandleScope () | |
~HandleScope () | |
template<class T > | |
Local< T > | Close (Handle< T > value) |
Static Public Member Functions | |
static int | NumberOfHandles () |
static internal::Object ** | CreateHandle (internal::Object *value) |
static internal::Object ** | CreateHandle (internal::HeapObject *value) |
Friends | |
class | ImplementationUtilities |
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.
HandleScope | ( | ) |
Definition at line 685 of file api.cc.
References API_ENTRY_CHECK, and Isolate::handle_scope_data().
~HandleScope | ( | ) |
Closes the handle scope and returns the value as a handle in the previous scope, which is the new current scope after the call.
Definition at line 4324 of file v8.h.
References T.
Referenced by Handle< T >::EscapeFrom(), Message::Get(), Shell::GetCompletions(), StackTrace::GetFrame(), StackFrame::GetFunctionName(), Message::GetScriptData(), StackFrame::GetScriptName(), StackFrame::GetScriptNameOrSourceURL(), Message::GetScriptResourceName(), Message::GetSourceLine(), Message::GetStackTrace(), HandleF(), Function::NewInstance(), Shell::System(), and THREADED_TEST().
|
static |
Creates a new handle with the given value.
Definition at line 730 of file api.cc.
References HandleScope::CreateHandle().
Referenced by Local< T >::New().
|
static |
Definition at line 735 of file api.cc.
References ASSERT, HandleScope::CreateHandle(), and HeapObject::GetIsolate().
|
static |
Counts the number of allocated handles.
Definition at line 723 of file api.cc.
References HandleScope::NumberOfHandles().
|
friend |