Commit 00c49a3e authored by keishi's avatar keishi Committed by Commit bot

Add kGCCallbackFlagCollectAllExternalMemory for external memory limit triggered gc

BUG=chromium:570268,chromium:621829

Review-Url: https://codereview.chromium.org/2233683002
Cr-Commit-Position: refs/heads/master@{#38808}
parent f11270fd
......@@ -5246,6 +5246,7 @@ enum GCCallbackFlags {
kGCCallbackFlagForced = 1 << 2,
kGCCallbackFlagSynchronousPhantomCallbackProcessing = 1 << 3,
kGCCallbackFlagCollectAllAvailableGarbage = 1 << 4,
kGCCallbackFlagCollectAllExternalMemory = 1 << 5,
};
typedef void (*GCCallback)(GCType type, GCCallbackFlags flags);
......
......@@ -907,7 +907,10 @@ void Heap::ReportExternalMemoryPressure(const char* gc_reason) {
if (incremental_marking()->CanBeActivated()) {
StartIncrementalMarking(
i::Heap::kNoGCFlags,
kGCCallbackFlagSynchronousPhantomCallbackProcessing, gc_reason);
static_cast<GCCallbackFlags>(
kGCCallbackFlagSynchronousPhantomCallbackProcessing |
kGCCallbackFlagCollectAllExternalMemory),
gc_reason);
} else {
CollectAllGarbage(i::Heap::kNoGCFlags, gc_reason,
kGCCallbackFlagSynchronousPhantomCallbackProcessing);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment