Index: include/v8.h |
diff --git a/include/v8.h b/include/v8.h |
index ec1941e6fd86eec42707e4d41011112961fe2109..ef628cd8151366dbed95138eb250bbfa24f46ac4 100644 |
--- a/include/v8.h |
+++ b/include/v8.h |
@@ -85,6 +85,7 @@ class ObjectOperationDescriptor; |
class ObjectTemplate; |
class Platform; |
class Primitive; |
+class Promise; |
class RawOperationDescriptor; |
class Script; |
class Signature; |
@@ -1236,6 +1237,12 @@ class V8_EXPORT Message { |
Local<String> GetSourceLine() const; |
/** |
+ * Returns the promise attached to this message. If this message has not |
+ * been triggered by a promise rejection, the empty handle is returned. |
+ */ |
+ Handle<Promise> GetPromise() const; |
+ |
+ /** |
* Returns the origin for the script from where the function causing the |
* error originates. |
*/ |
@@ -2817,6 +2824,7 @@ class V8_EXPORT Promise : public Object { |
Local<Promise> Chain(Handle<Function> handler); |
Local<Promise> Catch(Handle<Function> handler); |
Local<Promise> Then(Handle<Function> handler); |
+ bool HasRejectHandler(); |
V8_INLINE static Promise* Cast(Value* obj); |
@@ -5820,7 +5828,7 @@ class Internals { |
static const int kNullValueRootIndex = 7; |
static const int kTrueValueRootIndex = 8; |
static const int kFalseValueRootIndex = 9; |
- static const int kEmptyStringRootIndex = 164; |
+ static const int kEmptyStringRootIndex = 165; |
// The external allocation limit should be below 256 MB on all architectures |
// to avoid that resource-constrained embedders run low on memory. |