Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 /** \mainpage V8 API Reference Guide | 5 /** \mainpage V8 API Reference Guide |
| 6 * | 6 * |
| 7 * V8 is Google's open source JavaScript engine. | 7 * V8 is Google's open source JavaScript engine. |
| 8 * | 8 * |
| 9 * This set of documents provides reference material generated from the | 9 * This set of documents provides reference material generated from the |
| 10 * V8 header file, include/v8.h. | 10 * V8 header file, include/v8.h. |
| (...skipping 4991 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5002 enum AllocationAction { | 5002 enum AllocationAction { |
| 5003 kAllocationActionAllocate = 1 << 0, | 5003 kAllocationActionAllocate = 1 << 0, |
| 5004 kAllocationActionFree = 1 << 1, | 5004 kAllocationActionFree = 1 << 1, |
| 5005 kAllocationActionAll = kAllocationActionAllocate | kAllocationActionFree | 5005 kAllocationActionAll = kAllocationActionAllocate | kAllocationActionFree |
| 5006 }; | 5006 }; |
| 5007 | 5007 |
| 5008 typedef void (*MemoryAllocationCallback)(ObjectSpace space, | 5008 typedef void (*MemoryAllocationCallback)(ObjectSpace space, |
| 5009 AllocationAction action, | 5009 AllocationAction action, |
| 5010 int size); | 5010 int size); |
| 5011 | 5011 |
| 5012 // --- Leave Script Callback --- | 5012 // --- Enter/Leave Script Callback --- |
| 5013 typedef void (*CallCompletedCallback)(); | 5013 typedef void (*BeforeCallEnteredCallback)(Isolate*); |
| 5014 typedef void (*CallCompletedCallback)(Isolate*); | |
| 5015 typedef void (*DeprecatedCallCompletedCallback)(); | |
| 5014 | 5016 |
| 5015 // --- Promise Reject Callback --- | 5017 // --- Promise Reject Callback --- |
| 5016 enum PromiseRejectEvent { | 5018 enum PromiseRejectEvent { |
| 5017 kPromiseRejectWithNoHandler = 0, | 5019 kPromiseRejectWithNoHandler = 0, |
| 5018 kPromiseHandlerAddedAfterReject = 1 | 5020 kPromiseHandlerAddedAfterReject = 1 |
| 5019 }; | 5021 }; |
| 5020 | 5022 |
| 5021 class PromiseRejectMessage { | 5023 class PromiseRejectMessage { |
| 5022 public: | 5024 public: |
| 5023 PromiseRejectMessage(Local<Promise> promise, PromiseRejectEvent event, | 5025 PromiseRejectMessage(Local<Promise> promise, PromiseRejectEvent event, |
| (...skipping 782 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5806 * schedule. | 5808 * schedule. |
| 5807 */ | 5809 */ |
| 5808 void RequestGarbageCollectionForTesting(GarbageCollectionType type); | 5810 void RequestGarbageCollectionForTesting(GarbageCollectionType type); |
| 5809 | 5811 |
| 5810 /** | 5812 /** |
| 5811 * Set the callback to invoke for logging event. | 5813 * Set the callback to invoke for logging event. |
| 5812 */ | 5814 */ |
| 5813 void SetEventLogger(LogEventCallback that); | 5815 void SetEventLogger(LogEventCallback that); |
| 5814 | 5816 |
| 5815 /** | 5817 /** |
| 5818 * Adds a callback to notify the host application right before a script | |
| 5819 * is about to run. If a script re-enters the runtime during executing, the | |
| 5820 * BeforeCallEnteredCallback is invoked for each re-entrance. | |
| 5821 * Executing scripts inside the callback will re-trigger the callback. | |
| 5822 */ | |
| 5823 void AddBeforeCallEnteredCallback(BeforeCallEnteredCallback callback); | |
| 5824 | |
| 5825 /** | |
| 5826 * Removes callback that was installed by AddBeforeCallEnteredCallback. | |
| 5827 */ | |
| 5828 void RemoveBeforeCallEnteredCallback(BeforeCallEnteredCallback callback); | |
| 5829 | |
| 5830 /** | |
| 5816 * Adds a callback to notify the host application when a script finished | 5831 * Adds a callback to notify the host application when a script finished |
| 5817 * running. If a script re-enters the runtime during executing, the | 5832 * running. If a script re-enters the runtime during executing, the |
| 5818 * CallCompletedCallback is only invoked when the outer-most script | 5833 * CallCompletedCallback is only invoked when the outer-most script |
| 5819 * execution ends. Executing scripts inside the callback do not trigger | 5834 * execution ends. Executing scripts inside the callback do not trigger |
| 5820 * further callbacks. | 5835 * further callbacks. |
| 5821 */ | 5836 */ |
| 5822 void AddCallCompletedCallback(CallCompletedCallback callback); | 5837 void AddCallCompletedCallback(CallCompletedCallback callback); |
| 5838 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.
| |
| 5839 "Use callback with parameter", | |
| 5840 void AddCallCompletedCallback(DeprecatedCallCompletedCallback callback)); | |
| 5823 | 5841 |
| 5824 /** | 5842 /** |
| 5825 * Removes callback that was installed by AddCallCompletedCallback. | 5843 * Removes callback that was installed by AddCallCompletedCallback. |
| 5826 */ | 5844 */ |
| 5827 void RemoveCallCompletedCallback(CallCompletedCallback callback); | 5845 void RemoveCallCompletedCallback(CallCompletedCallback callback); |
| 5828 | 5846 V8_DEPRECATED( |
| 5847 "Use callback with parameter", | |
| 5848 void RemoveCallCompletedCallback( | |
| 5849 DeprecatedCallCompletedCallback callback)); | |
| 5829 | 5850 |
| 5830 /** | 5851 /** |
| 5831 * Set callback to notify about promise reject with no handler, or | 5852 * Set callback to notify about promise reject with no handler, or |
| 5832 * revocation of such a previous notification once the handler is added. | 5853 * revocation of such a previous notification once the handler is added. |
| 5833 */ | 5854 */ |
| 5834 void SetPromiseRejectCallback(PromiseRejectCallback callback); | 5855 void SetPromiseRejectCallback(PromiseRejectCallback callback); |
| 5835 | 5856 |
| 5836 /** | 5857 /** |
| 5837 * Experimental: Runs the Microtask Work Queue until empty | 5858 * Experimental: Runs the Microtask Work Queue until empty |
| 5838 * Any exceptions thrown by microtask callbacks are swallowed. | 5859 * Any exceptions thrown by microtask callbacks are swallowed. |
| (...skipping 2699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 8538 */ | 8559 */ |
| 8539 | 8560 |
| 8540 | 8561 |
| 8541 } // namespace v8 | 8562 } // namespace v8 |
| 8542 | 8563 |
| 8543 | 8564 |
| 8544 #undef TYPE_CHECK | 8565 #undef TYPE_CHECK |
| 8545 | 8566 |
| 8546 | 8567 |
| 8547 #endif // INCLUDE_V8_H_ | 8568 #endif // INCLUDE_V8_H_ |
| OLD | NEW |