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

Unified Diff: include/v8.h

Issue 98973002: OilPan related infrastructure on the V8 side. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add api comments. Created 7 years 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') | no next file with comments »
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 815f43db7b2fb392ec521940c3b43821f190196b..f38da37f01d2c06ca52712dfdd7a3509aba2ab85 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -4111,12 +4111,15 @@ enum GCType {
enum GCCallbackFlags {
kNoGCCallbackFlags = 0,
kGCCallbackFlagCompacted = 1 << 0,
- kGCCallbackFlagConstructRetainedObjectInfos = 1 << 1
+ kGCCallbackFlagConstructRetainedObjectInfos = 1 << 1,
+ kGCCallbackForced = 1 << 2
};
typedef void (*GCPrologueCallback)(GCType type, GCCallbackFlags flags);
typedef void (*GCEpilogueCallback)(GCType type, GCCallbackFlags flags);
+typedef void (*InterruptCallback)(Isolate* isolate, void* data);
+
/**
* Collection of V8 heap information.
@@ -4377,6 +4380,22 @@ class V8_EXPORT Isolate {
*/
void RemoveGCEpilogueCallback(GCEpilogueCallback callback);
+ /**
+ * Request V8 to interrupt long running JavaScript code and invoke
+ * the given |callback| passing the given |data| to it. After |callback|
+ * returns control will be returned to the JavaScript code.
+ * At any given moment V8 can remember only a single callback for the very
+ * last interrupt request.
+ * Can be called from another thread without acquiring a |Locker|.
+ */
+ void RequestInterrupt(InterruptCallback callback, void* data);
+
+ /**
+ * Clear interrupt request created by |RequestInterrupt|.
+ * Can be called from another thread without acquiring a |Locker|.
+ */
+ void ClearInterrupt();
+
private:
Isolate();
Isolate(const Isolate&);
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698