Chromium Code Reviews| Index: include/v8.h |
| diff --git a/include/v8.h b/include/v8.h |
| index b57a9ca9acbc914163d0b7be90d6ae2e4d47205c..e4d3d0b77bb719d6c7cd32ba1c5261d27be6af2a 100644 |
| --- a/include/v8.h |
| +++ b/include/v8.h |
| @@ -3699,6 +3699,8 @@ class V8_EXPORT Function : public Object { |
| */ |
| class V8_EXPORT Promise : public Object { |
| public: |
| + enum PromiseStatus { kPending, kFulfilled, kRejected }; |
|
jochen (gone - plz use gerrit)
2016/12/20 07:49:52
why not an enum class?
also, please add a comment
Yang
2016/12/20 11:38:27
enum class requires static_cast all over the place
|
| + |
| class V8_EXPORT Resolver : public Object { |
| public: |
| /** |
| @@ -3755,6 +3757,10 @@ class V8_EXPORT Promise : public Object { |
| */ |
| bool HasHandler(); |
| + MaybeLocal<Value> Result(); |
|
jochen (gone - plz use gerrit)
2016/12/20 07:49:52
please also add a comment to document this API (an
Yang
2016/12/20 11:38:27
Done.
|
| + |
| + PromiseStatus Status(); |
| + |
| V8_INLINE static Promise* Cast(Value* obj); |
| private: |