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

Unified Diff: include/v8.h

Issue 306053003: Add API support for passing a C++ function as a microtask callback (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 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') | src/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 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.
« no previous file with comments | « no previous file | src/api.cc » ('j') | src/api.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698