5#ifndef INCLUDE_V8_MICROTASKS_QUEUE_H_
6#define INCLUDE_V8_MICROTASKS_QUEUE_H_
45 static std::unique_ptr<MicrotaskQueue>
New(
61 void* data =
nullptr) = 0;
104 friend class internal::MicrotaskQueue;
119 enum Type { kRunMicrotasks, kDoNotRunMicrotasks };
145 internal::Isolate*
const i_isolate_;
146 internal::MicrotaskQueue*
const microtask_queue_;
Definition: v8-isolate.h:261
Definition: v8-local-handle.h:266
Definition: v8-microtask-queue.h:40
virtual bool IsRunningMicrotasks() const =0
virtual void EnqueueMicrotask(Isolate *isolate, Local< Function > microtask)=0
virtual void AddMicrotasksCompletedCallback(MicrotasksCompletedCallbackWithData callback, void *data=nullptr)=0
virtual void RemoveMicrotasksCompletedCallback(MicrotasksCompletedCallbackWithData callback, void *data=nullptr)=0
virtual void PerformCheckpoint(Isolate *isolate)=0
virtual int GetMicrotasksScopeDepth() const =0
static std::unique_ptr< MicrotaskQueue > New(Isolate *isolate, MicrotasksPolicy policy=MicrotasksPolicy::kAuto)
MicrotaskQueue(const MicrotaskQueue &)=delete
virtual void EnqueueMicrotask(v8::Isolate *isolate, MicrotaskCallback callback, void *data=nullptr)=0
MicrotaskQueue & operator=(const MicrotaskQueue &)=delete
virtual ~MicrotaskQueue()=default
Definition: v8-microtask-queue.h:117
MicrotasksScope & operator=(const MicrotasksScope &)=delete
static void PerformCheckpoint(Isolate *isolate)
MicrotasksScope(Isolate *isolate, MicrotaskQueue *microtask_queue, Type type)
MicrotasksScope(Local< Context > context, Type type)
MicrotasksScope(const MicrotasksScope &)=delete
Type
Definition: v8-microtask-queue.h:119
static int GetCurrentDepth(Isolate *isolate)
static bool IsRunningMicrotasks(Isolate *isolate)
Definition: libplatform.h:15
void(*)(void *data) MicrotaskCallback
Definition: v8-microtask.h:14
MicrotasksPolicy
Definition: v8-microtask.h:24
void(*)(Isolate *, void *) MicrotasksCompletedCallbackWithData
Definition: v8-microtask.h:13
#define V8_EXPORT
Definition: v8config.h:793
#define V8_NODISCARD
Definition: v8config.h:682