Index: include/v8.h |
diff --git a/include/v8.h b/include/v8.h |
index e88eef29cc337c0f0f96f4dbb24ba2dcbfc890d8..72745a156fe34973fdbcd827f1b4159f9e0f89e0 100644 |
--- a/include/v8.h |
+++ b/include/v8.h |
@@ -5090,11 +5090,24 @@ enum GCType { |
kGCTypeIncrementalMarking | kGCTypeProcessWeakCallbacks |
}; |
+/** |
+ * GCCallbackFlags is used to notify additional information about the GC |
+ * callback. |
+ * - kGCCallbackFlagConstructRetainedObjectInfos: The GC callback is for |
+ * constructing retained object infos. |
+ * - kGCCallbackFlagForced: The GC callback is for a forced GC. |
+ * - kGCCallbackFlagSynchronousPhantomCallbackProcessing: The GC callback |
+ * is called synchronously without getting posted to an idle task. |
+ * - kGCCallbackFlagCollectAllAvailableGarbage: The GC callback is called |
+ * in a phase where V8 is trying to collect all available garbage |
+ * (e.g., handling a low memory notification). |
+ */ |
enum GCCallbackFlags { |
kNoGCCallbackFlags = 0, |
kGCCallbackFlagConstructRetainedObjectInfos = 1 << 1, |
kGCCallbackFlagForced = 1 << 2, |
- kGCCallbackFlagSynchronousPhantomCallbackProcessing = 1 << 3 |
+ kGCCallbackFlagSynchronousPhantomCallbackProcessing = 1 << 3, |
+ kGCCallbackFlagCollectAllAvailableGarbage = 1 << 4, |
}; |
typedef void (*GCCallback)(GCType type, GCCallbackFlags flags); |