Chromium Code Reviews| Index: include/v8.h |
| diff --git a/include/v8.h b/include/v8.h |
| index 53bad21c113e04d078f755cfbf8361f151e3875e..caea04410ad45062ccaf40ffe6fe2c0d0dcd1474 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,21 @@ class V8EXPORT V8 { |
| static void RemoveMemoryAllocationCallback(MemoryAllocationCallback 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 |
| + * execution ends. Executing scripts inside the callback do not trigger |
| + * further callbacks. |
| + */ |
| + static void AddCallCompletedCallback(CallCompletedCallback callback); |
| + |
| + /** |
| + * This function removes callback which was installed by |
|
danno
2012/01/04 08:38:49
Just: Removes callback that was installed by AddCa
|
| + * AddCallCompletedCallback 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 |