| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_OBJECTS_H_ | 5 #ifndef V8_OBJECTS_H_ |
| 6 #define V8_OBJECTS_H_ | 6 #define V8_OBJECTS_H_ |
| 7 | 7 |
| 8 #include <iosfwd> | 8 #include <iosfwd> |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| (...skipping 8489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8500 | 8500 |
| 8501 class JSPromise : public JSObject { | 8501 class JSPromise : public JSObject { |
| 8502 public: | 8502 public: |
| 8503 DECL_INT_ACCESSORS(status) | 8503 DECL_INT_ACCESSORS(status) |
| 8504 DECL_ACCESSORS(result, Object) | 8504 DECL_ACCESSORS(result, Object) |
| 8505 | 8505 |
| 8506 // There are 3 possible states for these fields -- | 8506 // There are 3 possible states for these fields -- |
| 8507 // 1) Undefined -- This is the zero state when there is no callback | 8507 // 1) Undefined -- This is the zero state when there is no callback |
| 8508 // or deferred fields registered. | 8508 // or deferred fields registered. |
| 8509 // | 8509 // |
| 8510 // 2) Object -- There is a single Callable directly attached to the | 8510 // 2) Object -- There is a single callback directly attached to the |
| 8511 // fulfill_reactions, reject_reactions and the deferred fields are | 8511 // fulfill_reactions, reject_reactions and the deferred fields are |
| 8512 // directly attached to the slots. In this state, deferred_promise | 8512 // directly attached to the slots. In this state, deferred_promise |
| 8513 // is a JSReceiver and deferred_on_{resolve, reject} are Callables. | 8513 // is a JSReceiver and deferred_on_{resolve, reject} are Callables. |
| 8514 // | 8514 // |
| 8515 // 3) FixedArray -- There is more than one callback and deferred | 8515 // 3) FixedArray -- There is more than one callback and deferred |
| 8516 // fields attached to a FixedArray. | 8516 // fields attached to a FixedArray. |
| 8517 // |
| 8518 // The callback can be a Callable or a Symbol. |
| 8517 DECL_ACCESSORS(deferred_promise, Object) | 8519 DECL_ACCESSORS(deferred_promise, Object) |
| 8518 DECL_ACCESSORS(deferred_on_resolve, Object) | 8520 DECL_ACCESSORS(deferred_on_resolve, Object) |
| 8519 DECL_ACCESSORS(deferred_on_reject, Object) | 8521 DECL_ACCESSORS(deferred_on_reject, Object) |
| 8520 DECL_ACCESSORS(fulfill_reactions, Object) | 8522 DECL_ACCESSORS(fulfill_reactions, Object) |
| 8521 DECL_ACCESSORS(reject_reactions, Object) | 8523 DECL_ACCESSORS(reject_reactions, Object) |
| 8522 | 8524 |
| 8523 DECL_INT_ACCESSORS(flags) | 8525 DECL_INT_ACCESSORS(flags) |
| 8524 | 8526 |
| 8525 // [has_handler]: Whether this promise has a reject handler or not. | 8527 // [has_handler]: Whether this promise has a reject handler or not. |
| 8526 DECL_BOOLEAN_ACCESSORS(has_handler) | 8528 DECL_BOOLEAN_ACCESSORS(has_handler) |
| (...skipping 3109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11636 } | 11638 } |
| 11637 }; | 11639 }; |
| 11638 | 11640 |
| 11639 | 11641 |
| 11640 } // NOLINT, false-positive due to second-order macros. | 11642 } // NOLINT, false-positive due to second-order macros. |
| 11641 } // NOLINT, false-positive due to second-order macros. | 11643 } // NOLINT, false-positive due to second-order macros. |
| 11642 | 11644 |
| 11643 #include "src/objects/object-macros-undef.h" | 11645 #include "src/objects/object-macros-undef.h" |
| 11644 | 11646 |
| 11645 #endif // V8_OBJECTS_H_ | 11647 #endif // V8_OBJECTS_H_ |
| OLD | NEW |