|
| #define | RETURN_FAILURE_IF_EXCEPTION(isolate) |
| |
| #define | RETURN_FAILURE_IF_EXCEPTION_DETECTOR(isolate, detector) |
| |
| #define | RETURN_VALUE_IF_EXCEPTION(isolate, value) |
| |
| #define | RETURN_VALUE_IF_EXCEPTION_DETECTOR(isolate, detector, value) |
| |
| #define | RETURN_EXCEPTION_IF_EXCEPTION(isolate) |
| |
| #define | MAYBE_RETURN_ON_EXCEPTION_VALUE(isolate, call, value) |
| |
| #define | RETURN_RESULT_OR_FAILURE(isolate, call) |
| |
| #define | ASSIGN_RETURN_ON_EXCEPTION_VALUE(isolate, dst, call, value) |
| |
| #define | ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, dst, call) |
| |
| #define | ASSIGN_RETURN_ON_EXCEPTION(isolate, dst, call) |
| |
| #define | THROW_NEW_ERROR_RETURN_FAILURE(isolate, call) |
| |
| #define | THROW_NEW_ERROR_RETURN_VALUE(isolate, call, value) |
| |
| #define | THROW_NEW_ERROR(isolate, call) |
| |
| #define | RETURN_ON_EXCEPTION_VALUE(isolate, call, value) |
| |
| #define | RETURN_FAILURE_ON_EXCEPTION(isolate, call) |
| |
| #define | RETURN_ON_EXCEPTION(isolate, call) |
| |
| #define | RETURN_FAILURE(isolate, should_throw, call) |
| |
| #define | MAYBE_RETURN(call, value) |
| |
| #define | MAYBE_RETURN_NULL(call) |
| |
| #define | API_ASSIGN_RETURN_ON_EXCEPTION_VALUE(isolate, dst, call, value) |
| |
| #define | MAYBE_RETURN_ON_EXCEPTION_VALUE(isolate, call, value) |
| |
| #define | MAYBE_RETURN_FAILURE_ON_EXCEPTION(isolate, call) |
| |
| #define | MAYBE_ASSIGN_RETURN_ON_EXCEPTION_VALUE(isolate, dst, call, value) |
| |
| #define | MAYBE_ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, dst, call) |
| |
| #define | FOR_WITH_HANDLE_SCOPE(isolate, loop_var_type, init, loop_var, limit_check, increment, body) |
| |
| #define | WHILE_WITH_HANDLE_SCOPE(isolate, limit_check, body) |
| |
| #define | FIELD_ACCESSOR(type, name) |
| |
| #define | ISOLATE_INIT_DEBUG_ARRAY_LIST(V) |
| |
| #define | ISOLATE_INIT_ARRAY_LIST(V) |
| |
| #define | ISOLATE_INIT_LIST(V) |
| |
| #define | THREAD_LOCAL_TOP_ACCESSOR(type, name) |
| |
| #define | THREAD_LOCAL_TOP_ADDRESS(type, name) |
| |
| #define | GLOBAL_ACCESSOR(type, name, initialvalue) |
| |
| #define | GLOBAL_ARRAY_ACCESSOR(type, name, length) |
| |
| #define | NATIVE_CONTEXT_FIELD_ACCESSOR(index, type, name) |
| |
| #define | GLOBAL_BACKING_STORE(type, name, initialvalue) |
| |
| #define | GLOBAL_ARRAY_BACKING_STORE(type, name, length) |
| |
| #define | STACK_CHECK(isolate, result_value) |
| |
| #define RETURN_FAILURE_ON_EXCEPTION |
( |
| isolate, |
|
|
| call ) |
| #define RETURN_ON_EXCEPTION |
( |
| isolate, |
|
|
| call ) |
Value:
#define RETURN_ON_EXCEPTION_VALUE(isolate, call, value)
RETURN_ON_EXCEPTION conditionally returns an empty MaybeHandle<T> if the given MaybeHandle is empty. Use it to return immediately from a function with return type MaybeHandle when an exception was thrown. Example usage:
MaybeHandle<X> Func() { ... RETURN_ON_EXCEPTION(
isolate,
FunctionWithReturnTypeMaybeHandleY(...),
X); // code to handle non exception ... }
If inside a function with return type Object, use RETURN_FAILURE_ON_EXCEPTION instead. If inside a function with return type Maybe<X> or Handle<X>, use RETURN_ON_EXCEPTION_VALUE instead.
Definition at line 395 of file isolate.h.
| #define RETURN_ON_EXCEPTION_VALUE |
( |
| isolate, |
|
|
| call, |
|
|
| value ) |
Value: do { \
if ((call).is_null()) { \
DCHECK((isolate)->has_exception()); \
} \
} while (false)
RETURN_ON_EXCEPTION_VALUE conditionally returns the given value when the given MaybeHandle is empty. It is typically used in functions with return type Maybe<X> or Handle<X>. Example usage:
Handle<X> Func() { ... RETURN_ON_EXCEPTION_VALUE( isolate, FunctionWithReturnTypeMaybeHandleX(...), Handle<X>()); // code to handle non exception ... }
Maybe<bool> Func() { .. RETURN_ON_EXCEPTION_VALUE(
isolate,
FunctionWithReturnTypeMaybeHandleX(...),
Nothing<bool>); // code to handle non exception return Just(true); }
If inside a function with return type MaybeHandle<X>, use RETURN_ON_EXCEPTION instead. If inside a function with return type Object, use RETURN_FAILURE_ON_EXCEPTION instead.
Definition at line 340 of file isolate.h.
| #define RETURN_RESULT_OR_FAILURE |
( |
| isolate, |
|
|
| call ) |
Value: do { \
DirectHandle<Object> __result__; \
Isolate* __isolate__ = (
isolate); \
if (!(call).ToHandle(&__result__)) { \
DCHECK(__isolate__->has_exception()); \
return ReadOnlyRoots(__isolate__).exception(); \
} \
DCHECK(!__isolate__->has_exception()); \
return *__result__; \
} while (false)
RETURN_RESULT_OR_FAILURE is used in functions with return type Object (such as "RUNTIME_FUNCTION(...) {...}" or "BUILTIN(...) {...}" ) to return either the contents of a MaybeHandle<X>, or the "exception" sentinel value. Example usage:
RUNTIME_FUNCTION(Runtime_Func) { ... RETURN_RESULT_OR_FAILURE(
isolate,
FunctionWithReturnTypeMaybeHandleX(...)); }
If inside a function with return type MaybeHandle<X> use RETURN_ON_EXCEPTION instead. If inside a function with return type Handle<X>, or Maybe<X> use RETURN_ON_EXCEPTION_VALUE instead.
Definition at line 264 of file isolate.h.