5#ifndef INCLUDE_V8_PROMISE_H_
6#define INCLUDE_V8_PROMISE_H_
16#ifndef V8_PROMISE_INTERNAL_FIELD_COUNT
18#define V8_PROMISE_INTERNAL_FIELD_COUNT 0
56#ifdef V8_ENABLE_CHECKS
64 static void CheckCast(
Value* obj);
112#ifdef V8_ENABLE_CHECKS
115 return static_cast<Promise*
>(value);
122 static void CheckCast(
Value* obj);
158 : promise_(promise), event_(event), value_(value) {}
Definition: v8-local-handle.h:266
Definition: v8-local-handle.h:632
Definition: v8-maybe.h:32
Definition: v8-object.h:233
Definition: v8-promise.h:154
PromiseRejectMessage(Local< Promise > promise, PromiseRejectEvent event, Local< Value > value)
Definition: v8-promise.h:156
Local< Promise > GetPromise() const
Definition: v8-promise.h:160
PromiseRejectEvent GetEvent() const
Definition: v8-promise.h:161
Local< Value > GetValue() const
Definition: v8-promise.h:162
Definition: v8-promise.h:32
static MaybeLocal< Resolver > New(Local< Context > context)
Maybe< bool > Resolve(Local< Context > context, Local< Value > value)
static Resolver * Cast(Value *value)
Definition: v8-promise.h:55
Local< Promise > GetPromise()
Maybe< bool > Reject(Local< Context > context, Local< Value > value)
Definition: v8-promise.h:24
PromiseState
Definition: v8-promise.h:30
@ kFulfilled
Definition: v8-promise.h:30
MaybeLocal< Promise > Then(Local< Context > context, Local< Function > on_fulfilled, Local< Function > on_rejected)
static Promise * Cast(Value *value)
Definition: v8-promise.h:111
MaybeLocal< Promise > Catch(Local< Context > context, Local< Function > handler)
MaybeLocal< Promise > Then(Local< Context > context, Local< Function > handler)
Definition: v8-value.h:32
Definition: libplatform.h:15
PromiseRejectEvent
Definition: v8-promise.h:147
@ kPromiseHandlerAddedAfterReject
Definition: v8-promise.h:149
@ kPromiseRejectWithNoHandler
Definition: v8-promise.h:148
@ kPromiseRejectAfterResolved
Definition: v8-promise.h:150
@ kPromiseResolveAfterResolved
Definition: v8-promise.h:151
void(*)(PromiseHookType type, Local< Promise > promise, Local< Value > parent) PromiseHook
Definition: v8-promise.h:144
void(*)(PromiseRejectMessage message) PromiseRejectCallback
Definition: v8-promise.h:170
PromiseHookType
Definition: v8-promise.h:141
#define V8_PROMISE_INTERNAL_FIELD_COUNT
Definition: v8-promise.h:18
#define V8_EXPORT
Definition: v8config.h:793
#define V8_INLINE
Definition: v8config.h:499
#define V8_WARN_UNUSED_RESULT
Definition: v8config.h:660