Index: include/v8.h |
diff --git a/include/v8.h b/include/v8.h |
index a019c9d561f92a00ece1efd263e5d0a0c1deb987..5d5a368f992ff7c3b24605ec17b07d343b632bff 100644 |
--- a/include/v8.h |
+++ b/include/v8.h |
@@ -3858,6 +3858,9 @@ typedef void (*MemoryAllocationCallback)(ObjectSpace space, |
// --- Leave Script Callback --- |
typedef void (*CallCompletedCallback)(); |
+// --- External Microtask Callback --- |
+typedef void (*MicrotaskCallback)(); |
Sven Panne
2014/02/10 14:22:02
We should probably add an Isolate* parameter. Ever
rafaelw
2014/02/11 00:28:52
Done.
|
+ |
// --- Failed Access Check Callback --- |
typedef void (*FailedAccessCheckCallback)(Local<Object> target, |
AccessType type, |
@@ -4579,6 +4582,23 @@ class V8_EXPORT V8 { |
static void RemoveCallCompletedCallback(CallCompletedCallback callback); |
/** |
+ * Runs the Microtask Work Queue until empty |
rossberg
2014/02/10 14:09:01
The new functions could use comments pointing out
rafaelw
2014/02/11 00:28:52
Done.
|
+ */ |
+ static void RunMicrotasks(Isolate* isolate); |
+ |
+ /** |
+ * Enqueues the callback to the Microtask Work Queue |
+ */ |
+ static void EnqueueExternalMicrotask(Isolate* isolate, |
+ MicrotaskCallback callback); |
+ |
+ /** |
+ * Controls whether the Microtask Work Queue is automatically run when the |
+ * script call depth decrements to zero. |
+ */ |
+ static void SetAutorunMicrotasks(Isolate *source, bool autorun); |
+ |
+ /** |
* Initializes from snapshot if possible. Otherwise, attempts to |
* initialize from scratch. This function is called implicitly if |
* you use the API without calling it first. |