| Index: src/heap/incremental-marking.cc
|
| diff --git a/src/heap/incremental-marking.cc b/src/heap/incremental-marking.cc
|
| index bd0c0928cdc19f86feeaae5bc10dd8b69869c2fd..c27e81a8e127e2e2e0e4955ef06e0025c1898b8c 100644
|
| --- a/src/heap/incremental-marking.cc
|
| +++ b/src/heap/incremental-marking.cc
|
| @@ -787,14 +787,16 @@ void IncrementalMarking::Finalize() {
|
| }
|
|
|
|
|
| -void IncrementalMarking::OverApproximateWeakClosure() {
|
| +void IncrementalMarking::OverApproximateWeakClosure(CompletionAction action) {
|
| DCHECK(FLAG_overapproximate_weak_closure);
|
| DCHECK(!weak_closure_was_overapproximated_);
|
| if (FLAG_trace_incremental_marking) {
|
| PrintF("[IncrementalMarking] requesting weak closure overapproximation.\n");
|
| }
|
| request_type_ = OVERAPPROXIMATION;
|
| - heap_->isolate()->stack_guard()->RequestGC();
|
| + if (action == GC_VIA_STACK_GUARD) {
|
| + heap_->isolate()->stack_guard()->RequestGC();
|
| + }
|
| }
|
|
|
|
|
| @@ -809,8 +811,8 @@ void IncrementalMarking::MarkingComplete(CompletionAction action) {
|
| if (FLAG_trace_incremental_marking) {
|
| PrintF("[IncrementalMarking] Complete (normal).\n");
|
| }
|
| + request_type_ = COMPLETE_MARKING;
|
| if (action == GC_VIA_STACK_GUARD) {
|
| - request_type_ = COMPLETE_MARKING;
|
| heap_->isolate()->stack_guard()->RequestGC();
|
| }
|
| }
|
| @@ -963,9 +965,8 @@ intptr_t IncrementalMarking::Step(intptr_t allocated_bytes,
|
| if (completion == FORCE_COMPLETION ||
|
| IsIdleMarkingDelayCounterLimitReached()) {
|
| if (FLAG_overapproximate_weak_closure &&
|
| - !weak_closure_was_overapproximated_ &&
|
| - action == GC_VIA_STACK_GUARD) {
|
| - OverApproximateWeakClosure();
|
| + !weak_closure_was_overapproximated_) {
|
| + OverApproximateWeakClosure(action);
|
| } else {
|
| MarkingComplete(action);
|
| }
|
|
|