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 };
122 "May be incorrect if context was created with non-default microtask "
133 static
void PerformCheckpoint(
Isolate* isolate);
143 static
bool IsRunningMicrotasks(
Isolate* isolate);
150 internal::
Isolate* const i_isolate_;
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
V8_DEPRECATE_SOON("May be incorrect if context was created with non-default microtask " "queue") MicrotasksScope(Isolate *isolate
void(*)(Isolate *, void *) MicrotasksCompletedCallbackWithData
void(*)(void *data) MicrotaskCallback