v8
7.0.276 (node 11.14.0)
V8 is Google's open source JavaScript engine
|
#include <v8.h>
Public Member Functions | |
V8_INLINE | MaybeLocal () |
template<class S > | |
V8_INLINE | MaybeLocal (Local< S > that) |
V8_INLINE bool | IsEmpty () const |
template<class S > | |
V8_WARN_UNUSED_RESULT V8_INLINE bool | ToLocal (Local< S > *out) const |
V8_INLINE Local< T > | ToLocalChecked () |
template<class S > | |
V8_INLINE Local< S > | FromMaybe (Local< S > default_value) const |
A MaybeLocal<> is a wrapper around Local<> that enforces a check whether the Local<> is empty before it can be used.
If an API method returns a MaybeLocal<>, the API method can potentially fail either because an exception is thrown, or because an exception is pending, e.g. because a previous API call threw an exception that hasn't been caught yet, or because a TerminateExecution exception was thrown. In that case, an empty MaybeLocal is returned.
|
inline |
Definition at line 458 of file v8.h.
Referenced by V8InspectorClient::memoryInfo().
|
inline |
Converts this MaybeLocal<> to a Local<>, using a default value if this MaybeLocal<> is empty.
Definition at line 488 of file v8.h.
References MaybeLocal< T >::IsEmpty(), and Local< T >::Local.
|
inline |
Definition at line 465 of file v8.h.
Referenced by MaybeLocal< T >::FromMaybe(), and MaybeLocal< T >::ToLocal().
|
inline |
Converts this MaybeLocal<> to a Local<>. If this MaybeLocal<> is empty, |false| is returned and |out| is left untouched.
Definition at line 472 of file v8.h.
References MaybeLocal< T >::IsEmpty().
Local< T > ToLocalChecked |
Converts this MaybeLocal<> to a Local<>. If this MaybeLocal<> is empty, V8 will crash the process.
Definition at line 9582 of file v8.h.
References Local< T >::Local.
Referenced by Template::Set().