| Index: src/heap.cc
|
| diff --git a/src/heap.cc b/src/heap.cc
|
| index 5fc79f6a39b9641f94268bb5b3ee2dcf516926c3..62b673f5b2c4c7d51a51088257ea3c3694718cfd 100644
|
| --- a/src/heap.cc
|
| +++ b/src/heap.cc
|
| @@ -613,8 +613,10 @@ void Heap::CollectAllAvailableGarbage(const char* gc_reason) {
|
| kReduceMemoryFootprintMask);
|
| isolate_->compilation_cache()->Clear();
|
| const int kMaxNumberOfAttempts = 7;
|
| + const int kMinNumberOfAttempts = 2;
|
| for (int attempt = 0; attempt < kMaxNumberOfAttempts; attempt++) {
|
| - if (!CollectGarbage(OLD_POINTER_SPACE, MARK_COMPACTOR, gc_reason, NULL)) {
|
| + if (!CollectGarbage(OLD_POINTER_SPACE, MARK_COMPACTOR, gc_reason, NULL) &&
|
| + attempt + 1 >= kMinNumberOfAttempts) {
|
| break;
|
| }
|
| }
|
|
|