Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(259)

Unified Diff: include/v8.h

Issue 607913002: Report promise reject with no handler (behind a flag). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: more comments Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/api.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « no previous file | src/api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698