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 (*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:
| |
| 5013 typedef void (*CallCompletedCallback)(); | 5014 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.
| |
| 5014 | 5015 |
| 5015 // --- Promise Reject Callback --- | 5016 // --- Promise Reject Callback --- |
| 5016 enum PromiseRejectEvent { | 5017 enum PromiseRejectEvent { |
| 5017 kPromiseRejectWithNoHandler = 0, | 5018 kPromiseRejectWithNoHandler = 0, |
| 5018 kPromiseHandlerAddedAfterReject = 1 | 5019 kPromiseHandlerAddedAfterReject = 1 |
| 5019 }; | 5020 }; |
| 5020 | 5021 |
| 5021 class PromiseRejectMessage { | 5022 class PromiseRejectMessage { |
| 5022 public: | 5023 public: |
| 5023 PromiseRejectMessage(Local<Promise> promise, PromiseRejectEvent event, | 5024 PromiseRejectMessage(Local<Promise> promise, PromiseRejectEvent event, |
| (...skipping 779 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5803 * schedule. | 5804 * schedule. |
| 5804 */ | 5805 */ |
| 5805 void RequestGarbageCollectionForTesting(GarbageCollectionType type); | 5806 void RequestGarbageCollectionForTesting(GarbageCollectionType type); |
| 5806 | 5807 |
| 5807 /** | 5808 /** |
| 5808 * Set the callback to invoke for logging event. | 5809 * Set the callback to invoke for logging event. |
| 5809 */ | 5810 */ |
| 5810 void SetEventLogger(LogEventCallback that); | 5811 void SetEventLogger(LogEventCallback that); |
| 5811 | 5812 |
| 5812 /** | 5813 /** |
| 5814 * Adds a callback to notify the host application right before a script | |
| 5815 * is about to run. If a script re-enters the runtime during executing, the | |
| 5816 * BeforeCallEnteredCallback is invoked for each re-entrance. | |
| 5817 * Executing scripts inside the callback will re-trigger the callback. | |
| 5818 */ | |
| 5819 void AddBeforeCallEnteredCallback(BeforeCallEnteredCallback callback); | |
| 5820 | |
| 5821 /** | |
| 5822 * Removes callback that was installed by AddBeforeCallEnteredCallback. | |
| 5823 */ | |
| 5824 void RemoveBeforeCallEnteredCallback(BeforeCallEnteredCallback callback); | |
| 5825 | |
| 5826 /** | |
| 5813 * Adds a callback to notify the host application when a script finished | 5827 * Adds a callback to notify the host application when a script finished |
| 5814 * running. If a script re-enters the runtime during executing, the | 5828 * running. If a script re-enters the runtime during executing, the |
| 5815 * CallCompletedCallback is only invoked when the outer-most script | 5829 * CallCompletedCallback is only invoked when the outer-most script |
| 5816 * execution ends. Executing scripts inside the callback do not trigger | 5830 * execution ends. Executing scripts inside the callback do not trigger |
| 5817 * further callbacks. | 5831 * further callbacks. |
| 5818 */ | 5832 */ |
| 5819 void AddCallCompletedCallback(CallCompletedCallback callback); | 5833 void AddCallCompletedCallback(CallCompletedCallback callback); |
| 5820 | 5834 |
| 5821 /** | 5835 /** |
| 5822 * Removes callback that was installed by AddCallCompletedCallback. | 5836 * Removes callback that was installed by AddCallCompletedCallback. |
| 5823 */ | 5837 */ |
| 5824 void RemoveCallCompletedCallback(CallCompletedCallback callback); | 5838 void RemoveCallCompletedCallback(CallCompletedCallback callback); |
| 5825 | 5839 |
| 5826 | |
| 5827 /** | 5840 /** |
| 5828 * Set callback to notify about promise reject with no handler, or | 5841 * Set callback to notify about promise reject with no handler, or |
| 5829 * revocation of such a previous notification once the handler is added. | 5842 * revocation of such a previous notification once the handler is added. |
| 5830 */ | 5843 */ |
| 5831 void SetPromiseRejectCallback(PromiseRejectCallback callback); | 5844 void SetPromiseRejectCallback(PromiseRejectCallback callback); |
| 5832 | 5845 |
| 5833 /** | 5846 /** |
| 5834 * Experimental: Runs the Microtask Work Queue until empty | 5847 * Experimental: Runs the Microtask Work Queue until empty |
| 5835 * Any exceptions thrown by microtask callbacks are swallowed. | 5848 * Any exceptions thrown by microtask callbacks are swallowed. |
| 5836 */ | 5849 */ |
| (...skipping 2698 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 8535 */ | 8548 */ |
| 8536 | 8549 |
| 8537 | 8550 |
| 8538 } // namespace v8 | 8551 } // namespace v8 |
| 8539 | 8552 |
| 8540 | 8553 |
| 8541 #undef TYPE_CHECK | 8554 #undef TYPE_CHECK |
| 8542 | 8555 |
| 8543 | 8556 |
| 8544 #endif // INCLUDE_V8_H_ | 8557 #endif // INCLUDE_V8_H_ |
| OLD | NEW |