v8
10.1.124 (node 18.2.0)
V8 is Google's open source JavaScript engine
|
#include <v8-microtask-queue.h>
Public Types | |
enum | Type { kRunMicrotasks , kDoNotRunMicrotasks } |
Public Member Functions | |
MicrotasksScope (Isolate *isolate, Type type) | |
MicrotasksScope (Isolate *isolate, MicrotaskQueue *microtask_queue, Type type) | |
~MicrotasksScope () | |
MicrotasksScope (const MicrotasksScope &)=delete | |
MicrotasksScope & | operator= (const MicrotasksScope &)=delete |
Static Public Member Functions | |
static void | PerformCheckpoint (Isolate *isolate) |
static int | GetCurrentDepth (Isolate *isolate) |
static bool | IsRunningMicrotasks (Isolate *isolate) |
This scope is used to control microtasks when MicrotasksPolicy::kScoped is used on Isolate. In this mode every non-primitive call to V8 should be done inside some MicrotasksScope. Microtasks are executed when topmost MicrotasksScope marked as kRunMicrotasks exits. kDoNotRunMicrotasks should be used to annotate calls not intended to trigger microtasks.
Definition at line 117 of file v8-microtask-queue.h.
enum Type |
Enumerator | |
---|---|
kRunMicrotasks | |
kDoNotRunMicrotasks |
Definition at line 119 of file v8-microtask-queue.h.
MicrotasksScope | ( | Isolate * | isolate, |
Type | type | ||
) |
MicrotasksScope | ( | Isolate * | isolate, |
MicrotaskQueue * | microtask_queue, | ||
Type | type | ||
) |
~MicrotasksScope | ( | ) |
|
delete |
|
static |
Returns current depth of nested kRunMicrotasks scopes.
|
static |
Returns true while microtasks are being executed.
|
delete |
|
static |
Runs microtasks if no kRunMicrotasks scope is currently active.