5 #ifndef V8_OBJECTS_JS_PROMISE_INL_H_ 6 #define V8_OBJECTS_JS_PROMISE_INL_H_ 8 #include "src/objects/js-promise.h" 10 #include "src/objects-inl.h" 11 #include "src/objects.h" 14 #include "src/objects/object-macros.h" 19 CAST_ACCESSOR(JSPromise)
21 ACCESSORS(JSPromise, reactions_or_result, Object, kReactionsOrResultOffset)
22 SMI_ACCESSORS(JSPromise, flags, kFlagsOffset)
23 BOOL_ACCESSORS(JSPromise, flags, has_handler, kHasHandlerBit)
24 BOOL_ACCESSORS(JSPromise, flags, handled_hint, kHandledHintBit)
26 Object* JSPromise::result()
const {
27 DCHECK_NE(Promise::kPending, status());
28 return reactions_or_result();
31 Object* JSPromise::reactions()
const {
32 DCHECK_EQ(Promise::kPending, status());
33 return reactions_or_result();
39 #include "src/objects/object-macros-undef.h" 41 #endif // V8_OBJECTS_JS_PROMISE_INL_H_