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 3952 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3963 kAllocationActionAll = kAllocationActionAllocate | kAllocationActionFree | 3963 kAllocationActionAll = kAllocationActionAllocate | kAllocationActionFree |
3964 }; | 3964 }; |
3965 | 3965 |
3966 typedef void (*MemoryAllocationCallback)(ObjectSpace space, | 3966 typedef void (*MemoryAllocationCallback)(ObjectSpace space, |
3967 AllocationAction action, | 3967 AllocationAction action, |
3968 int size); | 3968 int size); |
3969 | 3969 |
3970 // --- Leave Script Callback --- | 3970 // --- Leave Script Callback --- |
3971 typedef void (*CallCompletedCallback)(); | 3971 typedef void (*CallCompletedCallback)(); |
3972 | 3972 |
| 3973 // --- Microtask Callback --- |
| 3974 typedef void (*MicrotaskCallback)(void* data); |
| 3975 |
3973 // --- Failed Access Check Callback --- | 3976 // --- Failed Access Check Callback --- |
3974 typedef void (*FailedAccessCheckCallback)(Local<Object> target, | 3977 typedef void (*FailedAccessCheckCallback)(Local<Object> target, |
3975 AccessType type, | 3978 AccessType type, |
3976 Local<Value> data); | 3979 Local<Value> data); |
3977 | 3980 |
3978 // --- AllowCodeGenerationFromStrings callbacks --- | 3981 // --- AllowCodeGenerationFromStrings callbacks --- |
3979 | 3982 |
3980 /** | 3983 /** |
3981 * Callback to check if code generation from strings is allowed. See | 3984 * Callback to check if code generation from strings is allowed. See |
3982 * Context::AllowCodeGenerationFromStrings. | 3985 * Context::AllowCodeGenerationFromStrings. |
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4382 * Experimental: Runs the Microtask Work Queue until empty | 4385 * Experimental: Runs the Microtask Work Queue until empty |
4383 * Any exceptions thrown by microtask callbacks are swallowed. | 4386 * Any exceptions thrown by microtask callbacks are swallowed. |
4384 */ | 4387 */ |
4385 void RunMicrotasks(); | 4388 void RunMicrotasks(); |
4386 | 4389 |
4387 /** | 4390 /** |
4388 * Experimental: Enqueues the callback to the Microtask Work Queue | 4391 * Experimental: Enqueues the callback to the Microtask Work Queue |
4389 */ | 4392 */ |
4390 void EnqueueMicrotask(Handle<Function> microtask); | 4393 void EnqueueMicrotask(Handle<Function> microtask); |
4391 | 4394 |
| 4395 /** |
| 4396 * Experimental: Enqueues the callback to the Microtask Work Queue |
| 4397 */ |
| 4398 void EnqueueMicrotask(MicrotaskCallback microtask, void* data = NULL); |
| 4399 |
4392 /** | 4400 /** |
4393 * Experimental: Controls whether the Microtask Work Queue is automatically | 4401 * Experimental: Controls whether the Microtask Work Queue is automatically |
4394 * run when the script call depth decrements to zero. | 4402 * run when the script call depth decrements to zero. |
4395 */ | 4403 */ |
4396 void SetAutorunMicrotasks(bool autorun); | 4404 void SetAutorunMicrotasks(bool autorun); |
4397 | 4405 |
4398 /** | 4406 /** |
4399 * Experimental: Returns whether the Microtask Work Queue is automatically | 4407 * Experimental: Returns whether the Microtask Work Queue is automatically |
4400 * run when the script call depth decrements to zero. | 4408 * run when the script call depth decrements to zero. |
4401 */ | 4409 */ |
(...skipping 2228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6630 */ | 6638 */ |
6631 | 6639 |
6632 | 6640 |
6633 } // namespace v8 | 6641 } // namespace v8 |
6634 | 6642 |
6635 | 6643 |
6636 #undef TYPE_CHECK | 6644 #undef TYPE_CHECK |
6637 | 6645 |
6638 | 6646 |
6639 #endif // V8_H_ | 6647 #endif // V8_H_ |
OLD | NEW |