#include <v8-microtask-queue.h>
Represents the microtask queue, where microtasks are stored and processed. https://html.spec.whatwg.org/multipage/webappapis.html#microtask-queue https://html.spec.whatwg.org/multipage/webappapis.html#enqueuejob(queuename,-job,-arguments) https://html.spec.whatwg.org/multipage/webappapis.html#perform-a-microtask-checkpoint
A MicrotaskQueue instance may be associated to multiple Contexts by passing it to Context::New(), and they can be detached by Context::DetachGlobal(). The embedder must keep the MicrotaskQueue instance alive until all associated Contexts are gone or detached.
Use the same instance of MicrotaskQueue for all Contexts that may access each other synchronously. E.g. for Web embedding, use the same instance for all origins that share the same URL scheme and eTLD+1.
Definition at line 40 of file v8-microtask-queue.h.
◆ ~MicrotaskQueue()
virtual v8::MicrotaskQueue::~MicrotaskQueue |
( |
| ) |
|
|
virtualdefault |
◆ MicrotaskQueue() [1/2]
◆ MicrotaskQueue() [2/2]
◆ AddMicrotasksCompletedCallback()
Adds a callback to notify the embedder after microtasks were run. The callback is triggered by explicit RunMicrotasks call or automatic microtasks execution (see Isolate::SetMicrotasksPolicy).
Callback will trigger even if microtasks were attempted to run, but the microtasks queue was empty and no single microtask was actually executed.
Executing scripts inside the callback will not re-trigger microtasks and the callback.
Implemented in v8::internal::MicrotaskQueue.
◆ EnqueueMicrotask() [1/2]
virtual void v8::MicrotaskQueue::EnqueueMicrotask |
( |
Isolate * | isolate, |
|
|
Local< Function > | microtask ) |
|
pure virtual |
◆ EnqueueMicrotask() [2/2]
◆ GetMicrotasksScopeDepth()
virtual int v8::MicrotaskQueue::GetMicrotasksScopeDepth |
( |
| ) |
const |
|
pure virtual |
◆ IsRunningMicrotasks()
virtual bool v8::MicrotaskQueue::IsRunningMicrotasks |
( |
| ) |
const |
|
pure virtual |
◆ New()
◆ operator=()
◆ PerformCheckpoint()
virtual void v8::MicrotaskQueue::PerformCheckpoint |
( |
Isolate * | isolate | ) |
|
|
pure virtual |
◆ RemoveMicrotasksCompletedCallback()
◆ internal::MicrotaskQueue
The documentation for this class was generated from the following files: