From 61a1f9cfe2cf5e29e9649ff94114865d5ef558cb Mon Sep 17 00:00:00 2001 From: hpayer Date: Mon, 8 May 2017 11:09:39 -0700 Subject: [PATCH] v8: backport 4f82f1d948c from upstream v8 Original commit message: [Api] Add an idle time garbage collection callback flag to GCCallbackFlags. BUG=chromium:718484 Review-Url: https://codereview.chromium.org/2867073002 Cr-Commit-Position: refs/heads/master@{#45167} PR-URL: https://github.com/nodejs/node/pull/13217 Reviewed-By: Franziska Hinkelmann Reviewed-By: Ben Noordhuis Reviewed-By: Anna Henningsen Reviewed-By: James M Snell --- deps/v8/include/v8.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/deps/v8/include/v8.h b/deps/v8/include/v8.h index a096a7b2fbd110..8637e060b51ae9 100644 --- a/deps/v8/include/v8.h +++ b/deps/v8/include/v8.h @@ -6180,6 +6180,8 @@ enum GCType { * - 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). + * - kGCCallbackScheduleIdleCollectGarbage: The GC callback is called to + * trigger an idle garbage collection. */ enum GCCallbackFlags { kNoGCCallbackFlags = 0, @@ -6188,6 +6190,7 @@ enum GCCallbackFlags { kGCCallbackFlagSynchronousPhantomCallbackProcessing = 1 << 3, kGCCallbackFlagCollectAllAvailableGarbage = 1 << 4, kGCCallbackFlagCollectAllExternalMemory = 1 << 5, + kGCCallbackScheduleIdleCollectGarbage = 1 << 6, }; typedef void (*GCCallback)(GCType type, GCCallbackFlags flags);