Index: include/v8.h |
diff --git a/include/v8.h b/include/v8.h |
index 081b6c3810793b92dab625578727e46271689588..ed0f5c16e45b165651f9f19307229cfc0372318b 100644 |
--- a/include/v8.h |
+++ b/include/v8.h |
@@ -5009,7 +5009,8 @@ typedef void (*MemoryAllocationCallback)(ObjectSpace space, |
AllocationAction action, |
int size); |
-// --- Leave Script Callback --- |
+// --- Enter/Leave Script Callback --- |
+typedef void (*BeforeCallEnteredCallback)(Isolate*); |
jochen (gone - plz use gerrit)
2016/02/17 12:58:48
what's the reason we need an isolate ptr here, but
dgozman
2016/02/17 16:51:12
Passing isolate replaces the need to call Isolate:
|
typedef void (*CallCompletedCallback)(); |
jochen (gone - plz use gerrit)
2016/02/18 13:48:38
can you add an isolate* parameter here as well the
dgozman
2016/02/19 01:59:42
Done.
|
// --- Promise Reject Callback --- |
@@ -5810,6 +5811,19 @@ class V8_EXPORT Isolate { |
void SetEventLogger(LogEventCallback that); |
/** |
+ * Adds a callback to notify the host application right before a script |
+ * is about to run. If a script re-enters the runtime during executing, the |
+ * BeforeCallEnteredCallback is invoked for each re-entrance. |
+ * Executing scripts inside the callback will re-trigger the callback. |
+ */ |
+ void AddBeforeCallEnteredCallback(BeforeCallEnteredCallback callback); |
+ |
+ /** |
+ * Removes callback that was installed by AddBeforeCallEnteredCallback. |
+ */ |
+ void RemoveBeforeCallEnteredCallback(BeforeCallEnteredCallback callback); |
+ |
+ /** |
* Adds a callback to notify the host application when a script finished |
* running. If a script re-enters the runtime during executing, the |
* CallCompletedCallback is only invoked when the outer-most script |
@@ -5823,7 +5837,6 @@ class V8_EXPORT Isolate { |
*/ |
void RemoveCallCompletedCallback(CallCompletedCallback callback); |
- |
/** |
* Set callback to notify about promise reject with no handler, or |
* revocation of such a previous notification once the handler is added. |