Index: include/v8.h |
diff --git a/include/v8.h b/include/v8.h |
index 3a8b071099b84aa883f5c87a91034a67d701b82e..e79f9568ef5bc51b8d6ae4332ad85e407c6fb742 100644 |
--- a/include/v8.h |
+++ b/include/v8.h |
@@ -5756,6 +5756,11 @@ typedef void (*BeforeCallEnteredCallback)(Isolate*); |
typedef void (*CallCompletedCallback)(Isolate*); |
typedef void (*DeprecatedCallCompletedCallback)(); |
+enum class PromiseHookType { kInit, kResolve, kBefore, kAfter }; |
jochen (gone - plz use gerrit)
2016/12/16 09:36:41
can you please add a comment explaining the differ
gsathya
2016/12/16 18:04:25
Done.
|
+ |
+typedef void (*PromiseHook)(PromiseHookType type, Local<Promise> promise, |
jochen (gone - plz use gerrit)
2016/12/16 09:36:41
same here, what is parent?
gsathya
2016/12/16 18:04:25
Done.
|
+ Local<Value> parent); |
+ |
// --- Promise Reject Callback --- |
enum PromiseRejectEvent { |
kPromiseRejectWithNoHandler = 0, |
@@ -6867,6 +6872,12 @@ class V8_EXPORT Isolate { |
DeprecatedCallCompletedCallback callback)); |
/** |
+ * Experimental: Set the PromiseHook callback for various promise |
+ * lifecycle events. |
+ */ |
+ void SetPromiseHook(PromiseHook hook); |
+ |
+ /** |
* Set callback to notify about promise reject with no handler, or |
* revocation of such a previous notification once the handler is added. |
*/ |