Commit 0cef7f7c authored by hpayer's avatar hpayer Committed by Commit Bot

[heap] Register an idle embedder garbage collection when starting incremental...

[heap] Register an idle embedder garbage collection when starting incremental marking through reached marking limit.

We need to schedule an idle garbage collection in the embedder to drive progress. The embedder is responsible to schedule the request or ignore it.

BUG=chromium:728228

Review-Url: https://codereview.chromium.org/2937433002
Cr-Commit-Position: refs/heads/master@{#45866}
parent 1624da37
......@@ -1068,8 +1068,8 @@ bool Heap::CollectGarbage(GarbageCollector collector,
// causes another mark-compact.
if (IsYoungGenerationCollector(collector) &&
!ShouldAbortIncrementalMarking()) {
StartIncrementalMarkingIfAllocationLimitIsReached(kNoGCFlags,
kNoGCCallbackFlags);
StartIncrementalMarkingIfAllocationLimitIsReached(
kNoGCFlags, kGCCallbackScheduleIdleGarbageCollection);
}
return next_gc_likely_to_collect_more;
......
......@@ -2718,7 +2718,7 @@ HeapObject* FreeList::Allocate(size_t size_in_bytes) {
owner_->EmptyAllocationInfo();
owner_->heap()->StartIncrementalMarkingIfAllocationLimitIsReached(
Heap::kNoGCFlags, kNoGCCallbackFlags);
Heap::kNoGCFlags, kGCCallbackScheduleIdleGarbageCollection);
size_t new_node_size = 0;
FreeSpace* new_node = FindNodeFor(size_in_bytes, &new_node_size);
......@@ -3156,8 +3156,8 @@ AllocationResult LargeObjectSpace::AllocateRaw(int object_size,
reinterpret_cast<Object**>(object->address())[1] = Smi::kZero;
}
heap()->StartIncrementalMarkingIfAllocationLimitIsReached(Heap::kNoGCFlags,
kNoGCCallbackFlags);
heap()->StartIncrementalMarkingIfAllocationLimitIsReached(
Heap::kNoGCFlags, kGCCallbackScheduleIdleGarbageCollection);
AllocationStep(object->address(), object_size);
heap()->CreateFillerObjectAt(object->address(), object_size,
......
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