V8 Project
|
A light-weight stack-allocated object handle. More...
#include <v8.h>
Public Member Functions | |
Local () | |
template<class S > | |
Local (Local< S > that) | |
template<class S > | |
Local (Handle< S > that) | |
template<class S > | |
Local< S > | As () |
![]() | |
Handle () | |
Creates an empty handle. More... | |
template<class S > | |
Handle (Handle< S > that) | |
Creates a handle for the contents of the specified handle. More... | |
bool | IsEmpty () const |
Returns true if the handle is empty. More... | |
void | Clear () |
Sets the handle to be empty. More... | |
T * | operator-> () const |
T * | operator* () const |
template<class S > | |
bool | operator== (const Handle< S > &that) const |
Checks whether two handles are the same. More... | |
template<class S > | |
bool | operator== (const PersistentBase< S > &that) const |
template<class S > | |
bool | operator!= (const Handle< S > &that) const |
Checks whether two handles are different. More... | |
template<class S > | |
bool | operator!= (const Persistent< S > &that) const |
template<class S > | |
Handle< S > | As () |
Static Public Member Functions | |
template<class S > | |
static Local< T > | Cast (Local< S > that) |
static Local< T > | New (Isolate *isolate, Handle< T > that) |
Create a local handle for the content of another handle. More... | |
static Local< T > | New (Isolate *isolate, const PersistentBase< T > &that) |
![]() | |
template<class S > | |
static Handle< T > | Cast (Handle< S > that) |
static Handle< T > | New (Isolate *isolate, Handle< T > that) |
static Handle< T > | New (Isolate *isolate, const PersistentBase< T > &that) |
Private Member Functions | |
template<class S > | |
Local (S *that) | |
Static Private Member Functions | |
static Local< T > | New (Isolate *isolate, T *that) |
Friends | |
class | Utils |
template<class F > | |
class | Eternal |
template<class F > | |
class | PersistentBase |
template<class F , class M > | |
class | Persistent |
template<class F > | |
class | Handle |
template<class F > | |
class | Local |
template<class F > | |
class | FunctionCallbackInfo |
template<class F > | |
class | PropertyCallbackInfo |
class | String |
class | Object |
class | Context |
template<class F > | |
class | internal::CustomArguments |
class | HandleScope |
class | EscapableHandleScope |
template<class F1 , class F2 , class F3 > | |
class | PersistentValueMap |
template<class F1 , class F2 > | |
class | PersistentValueVector |
A light-weight stack-allocated object handle.
All operations that return objects from within v8 return them in local handles. They are created within HandleScopes, and all local handles allocated within a handle scope are destroyed when the handle scope is destroyed. Hence it is not necessary to explicitly deallocate local handles.
This check fails when trying to convert between incompatible handles. For example, converting from a Handle<String> to a Handle<Number>.
Definition at line 337 of file v8.h.
References S, T, and TYPE_CHECK.
Definition at line 356 of file v8.h.
References S, T, and TYPE_CHECK.
Definition at line 361 of file v8.h.
References v8::Local< T >::Cast().
|
inlinestatic |
Definition at line 348 of file v8.h.
References v8::Handle< T >::IsEmpty().
Referenced by v8::Local< T >::As(), v8::Promise::Catch(), v8::Promise::Chain(), v8::Shell::GetCompletions(), v8::Promise::Resolver::GetPromise(), v8::HandleDebugEvent(), v8::Promise::Resolver::New(), and v8::Promise::Then().
|
inlinestatic |
Definition at line 5992 of file v8.h.
References v8::PersistentBase< T >::val_.
|
inlinestatic |
Create a local handle for the content of another handle.
The referee is kept alive by the local handle even when the original handle is destroyed/disposed.
Definition at line 5987 of file v8.h.
References v8::Handle< T >::val_.
Referenced by v8::ReadLineEditor::CompletionGenerator(), v8::Shell::DebugCommandToJSONRequest(), v8::Shell::DebugMessageDetails(), v8::Shell::ExecuteString(), v8::PersistentValueMap< K, V, Traits >::Get(), v8::PersistentValueVector< V, Traits >::Get(), v8::Shell::GetCompletions(), v8::Shell::InstallUtilityScript(), v8::PersistentValueMap< K, V, Traits >::PersistentValueReference::NewLocal(), v8::Shell::RealmEval(), v8::Shell::ReportException(), v8::Shell::RunShell(), and v8::TryCatch::~TryCatch().
|
inlinestaticprivate |
Definition at line 6007 of file v8.h.
References v8::HandleScope::CreateHandle(), NULL, and T.
|
friend |
|
friend |