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

Unified Diff: include/v8.h

Issue 8937003: Implement callback when script finishes running in V8 API. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fixed comments. Created 8 years, 12 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/v8.h » ('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 53bad21c113e04d078f755cfbf8361f151e3875e..caea04410ad45062ccaf40ffe6fe2c0d0dcd1474 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -2635,6 +2635,9 @@ typedef void (*MemoryAllocationCallback)(ObjectSpace space,
AllocationAction action,
int size);
+// --- Leave Script Callback ---
+typedef void (*CallCompletedCallback)();
+
// --- Failed Access Check Callback ---
typedef void (*FailedAccessCheckCallback)(Local<Object> target,
AccessType type,
@@ -3039,6 +3042,21 @@ class V8EXPORT V8 {
static void RemoveMemoryAllocationCallback(MemoryAllocationCallback callback);
/**
+ * Adds a callback to notify the host application when a script finished
+ * running. If a script re-enters the runtime during executing, the
+ * CallCompletedCallback is only invoked when the outer-most script
+ * execution ends. Executing scripts inside the callback do not trigger
+ * further callbacks.
+ */
+ static void AddCallCompletedCallback(CallCompletedCallback callback);
+
+ /**
+ * This function removes callback which was installed by
danno 2012/01/04 08:38:49 Just: Removes callback that was installed by AddCa
+ * AddCallCompletedCallback function.
+ */
+ static void RemoveCallCompletedCallback(CallCompletedCallback callback);
+
+ /**
* Allows the host application to group objects together. If one
* object in the group is alive, all objects in the group are alive.
* After each garbage collection, object groups are removed. It is
« no previous file with comments | « no previous file | src/api.cc » ('j') | src/v8.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698