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 isolate_;
146 internal::MicrotaskQueue*
const microtask_queue_;
virtual void RemoveMicrotasksCompletedCallback(MicrotasksCompletedCallbackWithData callback, void *data=nullptr)=0
virtual void AddMicrotasksCompletedCallback(MicrotasksCompletedCallbackWithData callback, void *data=nullptr)=0
virtual bool IsRunningMicrotasks() const =0
virtual void PerformCheckpoint(Isolate *isolate)=0
virtual ~MicrotaskQueue()=default
MicrotaskQueue & operator=(const MicrotaskQueue &)=delete
virtual int GetMicrotasksScopeDepth() const =0
static std::unique_ptr< MicrotaskQueue > New(Isolate *isolate, MicrotasksPolicy policy=MicrotasksPolicy::kAuto)
virtual void EnqueueMicrotask(Isolate *isolate, Local< Function > microtask)=0
virtual void EnqueueMicrotask(v8::Isolate *isolate, MicrotaskCallback callback, void *data=nullptr)=0
MicrotaskQueue(const MicrotaskQueue &)=delete
MicrotasksScope & operator=(const MicrotasksScope &)=delete
MicrotasksScope(Isolate *isolate, MicrotaskQueue *microtask_queue, Type type)
static bool IsRunningMicrotasks(Isolate *isolate)
MicrotasksScope(Isolate *isolate, Type type)
MicrotasksScope(const MicrotasksScope &)=delete
static void PerformCheckpoint(Isolate *isolate)
static int GetCurrentDepth(Isolate *isolate)
void(*)(Isolate *, void *) MicrotasksCompletedCallbackWithData
void(*)(void *data) MicrotaskCallback