Index: include/v8.h |
diff --git a/include/v8.h b/include/v8.h |
index 53bad21c113e04d078f755cfbf8361f151e3875e..28910f70109f0661dd143cf6e885060b706f76d3 100644 |
--- a/include/v8.h |
+++ b/include/v8.h |
@@ -2635,6 +2635,9 @@ typedef void (*MemoryAllocationCallback)(ObjectSpace space, |
AllocationAction action, |
int size); |
+// --- Leave Script Callback --- |
+typedef void (*CallCompletedCallback)(); |
+ |
// --- Failed Access Check Callback --- |
typedef void (*FailedAccessCheckCallback)(Local<Object> target, |
AccessType type, |
@@ -3039,6 +3042,19 @@ class V8EXPORT V8 { |
static void RemoveMemoryAllocationCallback(MemoryAllocationCallback callback); |
/** |
+ * Adds a callback to notify the host application when a script finished |
+ * running. In case of recursive scripts, the callback is only triggered |
danno
2012/01/03 15:35:12
"recursive" is a bit misleading. How about "If a s
|
+ * when the outer most recursion ends. |
+ */ |
+ static void AddCallCompletedCallback(CallCompletedCallback callback); |
+ |
+ /** |
+ * This function removes callback which was installed by |
+ * AddLeaveScriptCallback function. |
+ */ |
+ static void RemoveCallCompletedCallback(CallCompletedCallback callback); |
+ |
+ /** |
* Allows the host application to group objects together. If one |
* object in the group is alive, all objects in the group are alive. |
* After each garbage collection, object groups are removed. It is |