From 13a961e9dc2f4a34ef946965a8a8a8b3a1c0b02a 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 5292ed423251ed..711c3f398d2ef6 100644 --- a/deps/v8/include/v8.h +++ b/deps/v8/include/v8.h @@ -6015,6 +6015,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, @@ -6023,6 +6025,7 @@ enum GCCallbackFlags { kGCCallbackFlagSynchronousPhantomCallbackProcessing = 1 << 3, kGCCallbackFlagCollectAllAvailableGarbage = 1 << 4, kGCCallbackFlagCollectAllExternalMemory = 1 << 5, + kGCCallbackScheduleIdleCollectGarbage = 1 << 6, }; typedef void (*GCCallback)(GCType type, GCCallbackFlags flags);