| 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 5029 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5040 | 5040 |
| 5041 private: | 5041 private: |
| 5042 Local<Promise> promise_; | 5042 Local<Promise> promise_; |
| 5043 PromiseRejectEvent event_; | 5043 PromiseRejectEvent event_; |
| 5044 Local<Value> value_; | 5044 Local<Value> value_; |
| 5045 Local<StackTrace> stack_trace_; | 5045 Local<StackTrace> stack_trace_; |
| 5046 }; | 5046 }; |
| 5047 | 5047 |
| 5048 typedef void (*PromiseRejectCallback)(PromiseRejectMessage message); | 5048 typedef void (*PromiseRejectCallback)(PromiseRejectMessage message); |
| 5049 | 5049 |
| 5050 // --- Microtask Callback --- | 5050 // --- Microtasks Callbacks --- |
| 5051 typedef void (*MicrotasksCompletedCallback)(Isolate*); |
| 5051 typedef void (*MicrotaskCallback)(void* data); | 5052 typedef void (*MicrotaskCallback)(void* data); |
| 5052 | 5053 |
| 5053 // --- Failed Access Check Callback --- | 5054 // --- Failed Access Check Callback --- |
| 5054 typedef void (*FailedAccessCheckCallback)(Local<Object> target, | 5055 typedef void (*FailedAccessCheckCallback)(Local<Object> target, |
| 5055 AccessType type, | 5056 AccessType type, |
| 5056 Local<Value> data); | 5057 Local<Value> data); |
| 5057 | 5058 |
| 5058 // --- AllowCodeGenerationFromStrings callbacks --- | 5059 // --- AllowCodeGenerationFromStrings callbacks --- |
| 5059 | 5060 |
| 5060 /** | 5061 /** |
| (...skipping 820 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5881 */ | 5882 */ |
| 5882 void SetAutorunMicrotasks(bool autorun); | 5883 void SetAutorunMicrotasks(bool autorun); |
| 5883 | 5884 |
| 5884 /** | 5885 /** |
| 5885 * Experimental: Returns whether the Microtask Work Queue is automatically | 5886 * Experimental: Returns whether the Microtask Work Queue is automatically |
| 5886 * run when the script call depth decrements to zero. | 5887 * run when the script call depth decrements to zero. |
| 5887 */ | 5888 */ |
| 5888 bool WillAutorunMicrotasks() const; | 5889 bool WillAutorunMicrotasks() const; |
| 5889 | 5890 |
| 5890 /** | 5891 /** |
| 5892 * Experimental: adds a callback to notify the host application after |
| 5893 * microtasks were run. The callback is triggered by explicit RunMicrotasks |
| 5894 * call or automatic microtasks execution (see SetAutorunMicrotasks). |
| 5895 * |
| 5896 * Callback will trigger even if microtasks were attempted to run, |
| 5897 * but the microtasks queue was empty and no single microtask was actually |
| 5898 * executed. |
| 5899 * |
| 5900 * Executing scriptsinside the callback will not re-trigger microtasks and |
| 5901 * the callback. |
| 5902 */ |
| 5903 void AddMicrotasksCompletedCallback(MicrotasksCompletedCallback callback); |
| 5904 |
| 5905 /** |
| 5906 * Removes callback that was installed by AddMicrotasksCompletedCallback. |
| 5907 */ |
| 5908 void RemoveMicrotasksCompletedCallback(MicrotasksCompletedCallback callback); |
| 5909 |
| 5910 /** |
| 5891 * Sets a callback for counting the number of times a feature of V8 is used. | 5911 * Sets a callback for counting the number of times a feature of V8 is used. |
| 5892 */ | 5912 */ |
| 5893 void SetUseCounterCallback(UseCounterCallback callback); | 5913 void SetUseCounterCallback(UseCounterCallback callback); |
| 5894 | 5914 |
| 5895 /** | 5915 /** |
| 5896 * Enables the host application to provide a mechanism for recording | 5916 * Enables the host application to provide a mechanism for recording |
| 5897 * statistics counters. | 5917 * statistics counters. |
| 5898 */ | 5918 */ |
| 5899 void SetCounterFunction(CounterLookupCallback); | 5919 void SetCounterFunction(CounterLookupCallback); |
| 5900 | 5920 |
| (...skipping 2663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8564 */ | 8584 */ |
| 8565 | 8585 |
| 8566 | 8586 |
| 8567 } // namespace v8 | 8587 } // namespace v8 |
| 8568 | 8588 |
| 8569 | 8589 |
| 8570 #undef TYPE_CHECK | 8590 #undef TYPE_CHECK |
| 8571 | 8591 |
| 8572 | 8592 |
| 8573 #endif // INCLUDE_V8_H_ | 8593 #endif // INCLUDE_V8_H_ |
| OLD | NEW |