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

Unified Diff: include/v8.h

Issue 1298113003: [api,heap] Fix external GC callbacks. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 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/global-handles.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 95edfdb10cad504069835b8a87afaca55b5e594d..39868052f84aff3482596962aa512efd5998e854 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -4951,16 +4951,19 @@ typedef bool (*AllowCodeGenerationFromStringsCallback)(Local<Context> context);
// --- Garbage Collection Callbacks ---
/**
- * Applications can register callback functions which will be called
- * before and after a garbage collection. Allocations are not
- * allowed in the callback functions, you therefore cannot manipulate
- * objects (set or delete properties for example) since it is possible
- * such operations will result in the allocation of objects.
+ * Applications can register callback functions which will be called before and
+ * after certain garbage collection operations. Allocations are not allowed in
+ * the callback functions, you therefore cannot manipulate objects (set or
+ * delete properties for example) since it is possible such operations will
+ * result in the allocation of objects.
*/
enum GCType {
kGCTypeScavenge = 1 << 0,
kGCTypeMarkSweepCompact = 1 << 1,
- kGCTypeAll = kGCTypeScavenge | kGCTypeMarkSweepCompact
+ kGCTypeIncremental = 1 << 2,
Hannes Payer (out of office) 2015/08/18 09:18:13 kGCTypeIncrementalMarking maybe?
Michael Lippautz 2015/08/18 10:03:08 Done.
+ kGCTypeProcessWeakCallbacks = 1 << 3,
+ kGCTypeAll = kGCTypeScavenge | kGCTypeMarkSweepCompact | kGCTypeIncremental |
+ kGCTypeProcessWeakCallbacks
};
enum GCCallbackFlags {
@@ -4972,6 +4975,7 @@ enum GCCallbackFlags {
typedef void (*GCPrologueCallback)(GCType type, GCCallbackFlags flags);
typedef void (*GCEpilogueCallback)(GCType type, GCCallbackFlags flags);
+typedef void (*GCCallback)(GCType type, GCCallbackFlags flags);
Hannes Payer (out of office) 2015/08/18 09:18:13 We should deprecated the corresponding API functio
Michael Lippautz 2015/08/18 10:03:08 The typedefs are completely (read: 100%) compatibl
typedef void (*InterruptCallback)(Isolate* isolate, void* data);
@@ -5553,6 +5557,8 @@ class V8_EXPORT Isolate {
typedef void (*GCEpilogueCallback)(Isolate* isolate,
GCType type,
GCCallbackFlags flags);
+ typedef void (*GCCallback)(Isolate* isolate, GCType type,
+ GCCallbackFlags flags);
/**
* Enables the host application to receive a notification before a
« no previous file with comments | « no previous file | src/api.cc » ('j') | src/global-handles.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698