Chromium Code Reviews| Index: include/v8.h |
| diff --git a/include/v8.h b/include/v8.h |
| index 624bf5a385e9e42826592c4164a3ea8bfa11e1dc..bd0f1b222276b58f1bc8c40b58445b7c88c30b61 100644 |
| --- a/include/v8.h |
| +++ b/include/v8.h |
| @@ -5009,8 +5009,10 @@ typedef void (*MemoryAllocationCallback)(ObjectSpace space, |
| AllocationAction action, |
| int size); |
| -// --- Leave Script Callback --- |
| -typedef void (*CallCompletedCallback)(); |
| +// --- Enter/Leave Script Callback --- |
| +typedef void (*BeforeCallEnteredCallback)(Isolate*); |
| +typedef void (*CallCompletedCallback)(Isolate*); |
| +typedef void (*DeprecatedCallCompletedCallback)(); |
| // --- Promise Reject Callback --- |
| enum PromiseRejectEvent { |
| @@ -5813,6 +5815,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 |
| @@ -5820,12 +5835,18 @@ class V8_EXPORT Isolate { |
| * further callbacks. |
| */ |
| void AddCallCompletedCallback(CallCompletedCallback callback); |
| + V8_DEPRECATED( |
|
jochen (gone - plz use gerrit)
2016/02/19 14:44:57
you'll need V8_DEPRECATE_SOON - otherwise blink wo
dgozman
2016/02/19 16:56:00
Done.
|
| + "Use callback with parameter", |
| + void AddCallCompletedCallback(DeprecatedCallCompletedCallback callback)); |
| /** |
| * Removes callback that was installed by AddCallCompletedCallback. |
| */ |
| void RemoveCallCompletedCallback(CallCompletedCallback callback); |
| - |
| + V8_DEPRECATED( |
| + "Use callback with parameter", |
| + void RemoveCallCompletedCallback( |
| + DeprecatedCallCompletedCallback callback)); |
| /** |
| * Set callback to notify about promise reject with no handler, or |