Index: include/v8.h |
diff --git a/include/v8.h b/include/v8.h |
index 7af4322b08a7ded0a760bbb3aeb2ab96420a5231..12166ad756f4cddb0c4dca56858b279f31b3bdfc 100644 |
--- a/include/v8.h |
+++ b/include/v8.h |
@@ -3970,6 +3970,9 @@ typedef void (*MemoryAllocationCallback)(ObjectSpace space, |
// --- Leave Script Callback --- |
typedef void (*CallCompletedCallback)(); |
+// --- Microtask Callback --- |
+typedef void (*MicrotaskCallback)(void* data); |
+ |
// --- Failed Access Check Callback --- |
typedef void (*FailedAccessCheckCallback)(Local<Object> target, |
AccessType type, |
@@ -4389,6 +4392,11 @@ class V8_EXPORT Isolate { |
*/ |
void EnqueueMicrotask(Handle<Function> microtask); |
+ /** |
+ * Experimental: Enqueues the callback to the Microtask Work Queue |
+ */ |
+ void EnqueueMicrotask(MicrotaskCallback microtask, void* data = NULL); |
+ |
/** |
* Experimental: Controls whether the Microtask Work Queue is automatically |
* run when the script call depth decrements to zero. |