#include <v8.h>
Public Member Functions | |
MaybeLocal () | |
template<class S > | |
MaybeLocal (Local< S > that) | |
bool | IsEmpty () const |
template<class S > | |
bool | ToLocal (Local< S > *out) const |
Local< T > | ToLocalChecked () |
template<class S > | |
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 |
|
inline |
Converts this MaybeLocal<> to a Local<>, using a default value if this MaybeLocal<> is empty.
|
inline |
|
inline |
Converts this MaybeLocal<> to a Local<>. If this MaybeLocal<> is empty, |false| is returned and |out| is left untouched.
|
inline |
Converts this MaybeLocal<> to a Local<>. If this MaybeLocal<> is empty, V8 will crash the process.