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 5738 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5749 kAllocationActionAllocate = 1 << 0, | 5749 kAllocationActionAllocate = 1 << 0, |
| 5750 kAllocationActionFree = 1 << 1, | 5750 kAllocationActionFree = 1 << 1, |
| 5751 kAllocationActionAll = kAllocationActionAllocate | kAllocationActionFree | 5751 kAllocationActionAll = kAllocationActionAllocate | kAllocationActionFree |
| 5752 }; | 5752 }; |
| 5753 | 5753 |
| 5754 // --- Enter/Leave Script Callback --- | 5754 // --- Enter/Leave Script Callback --- |
| 5755 typedef void (*BeforeCallEnteredCallback)(Isolate*); | 5755 typedef void (*BeforeCallEnteredCallback)(Isolate*); |
| 5756 typedef void (*CallCompletedCallback)(Isolate*); | 5756 typedef void (*CallCompletedCallback)(Isolate*); |
| 5757 typedef void (*DeprecatedCallCompletedCallback)(); | 5757 typedef void (*DeprecatedCallCompletedCallback)(); |
| 5758 | 5758 |
| 5759 enum class PromiseHookType { kInit, kResolve, kBefore, kAfter }; | |
|
jochen (gone - plz use gerrit)
2016/12/16 09:36:41
can you please add a comment explaining the differ
gsathya
2016/12/16 18:04:25
Done.
| |
| 5760 | |
| 5761 typedef void (*PromiseHook)(PromiseHookType type, Local<Promise> promise, | |
|
jochen (gone - plz use gerrit)
2016/12/16 09:36:41
same here, what is parent?
gsathya
2016/12/16 18:04:25
Done.
| |
| 5762 Local<Value> parent); | |
| 5763 | |
| 5759 // --- Promise Reject Callback --- | 5764 // --- Promise Reject Callback --- |
| 5760 enum PromiseRejectEvent { | 5765 enum PromiseRejectEvent { |
| 5761 kPromiseRejectWithNoHandler = 0, | 5766 kPromiseRejectWithNoHandler = 0, |
| 5762 kPromiseHandlerAddedAfterReject = 1 | 5767 kPromiseHandlerAddedAfterReject = 1 |
| 5763 }; | 5768 }; |
| 5764 | 5769 |
| 5765 class PromiseRejectMessage { | 5770 class PromiseRejectMessage { |
| 5766 public: | 5771 public: |
| 5767 PromiseRejectMessage(Local<Promise> promise, PromiseRejectEvent event, | 5772 PromiseRejectMessage(Local<Promise> promise, PromiseRejectEvent event, |
| 5768 Local<Value> value, Local<StackTrace> stack_trace) | 5773 Local<Value> value, Local<StackTrace> stack_trace) |
| (...skipping 1091 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6860 /** | 6865 /** |
| 6861 * Removes callback that was installed by AddCallCompletedCallback. | 6866 * Removes callback that was installed by AddCallCompletedCallback. |
| 6862 */ | 6867 */ |
| 6863 void RemoveCallCompletedCallback(CallCompletedCallback callback); | 6868 void RemoveCallCompletedCallback(CallCompletedCallback callback); |
| 6864 V8_DEPRECATE_SOON( | 6869 V8_DEPRECATE_SOON( |
| 6865 "Use callback with parameter", | 6870 "Use callback with parameter", |
| 6866 void RemoveCallCompletedCallback( | 6871 void RemoveCallCompletedCallback( |
| 6867 DeprecatedCallCompletedCallback callback)); | 6872 DeprecatedCallCompletedCallback callback)); |
| 6868 | 6873 |
| 6869 /** | 6874 /** |
| 6875 * Experimental: Set the PromiseHook callback for various promise | |
| 6876 * lifecycle events. | |
| 6877 */ | |
| 6878 void SetPromiseHook(PromiseHook hook); | |
| 6879 | |
| 6880 /** | |
| 6870 * Set callback to notify about promise reject with no handler, or | 6881 * Set callback to notify about promise reject with no handler, or |
| 6871 * revocation of such a previous notification once the handler is added. | 6882 * revocation of such a previous notification once the handler is added. |
| 6872 */ | 6883 */ |
| 6873 void SetPromiseRejectCallback(PromiseRejectCallback callback); | 6884 void SetPromiseRejectCallback(PromiseRejectCallback callback); |
| 6874 | 6885 |
| 6875 /** | 6886 /** |
| 6876 * Experimental: Runs the Microtask Work Queue until empty | 6887 * Experimental: Runs the Microtask Work Queue until empty |
| 6877 * Any exceptions thrown by microtask callbacks are swallowed. | 6888 * Any exceptions thrown by microtask callbacks are swallowed. |
| 6878 */ | 6889 */ |
| 6879 void RunMicrotasks(); | 6890 void RunMicrotasks(); |
| (...skipping 2824 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 9704 */ | 9715 */ |
| 9705 | 9716 |
| 9706 | 9717 |
| 9707 } // namespace v8 | 9718 } // namespace v8 |
| 9708 | 9719 |
| 9709 | 9720 |
| 9710 #undef TYPE_CHECK | 9721 #undef TYPE_CHECK |
| 9711 | 9722 |
| 9712 | 9723 |
| 9713 #endif // INCLUDE_V8_H_ | 9724 #endif // INCLUDE_V8_H_ |
| OLD | NEW |