Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1681)

Unified Diff: include/v8.h

Issue 154283002: V8 Microtask Queue & API (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: pre-review Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/api.cc » ('j') | test/cctest/test-api.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « no previous file | src/api.cc » ('j') | test/cctest/test-api.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698