From 7bdb8db440b27dc4ed53afb04d7cb70293f4c060 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Wed, 25 Oct 2017 15:54:28 +0200 Subject: [PATCH] deps: cherry-pick 676c413 from upstream V8 Original commit message: [heap] Fix threshold for delayed chunks after 2c7561. Bug: chromium:771966 Change-Id: Iac5ee55c0d31de477f21f091f4be015a1ca8d00c Reviewed-on: https://chromium-review.googlesource.com/702382 Reviewed-by: Michael Lippautz Commit-Queue: Ulan Degenbaev Cr-Commit-Position: refs/heads/master@{#48316} Refs: https://github.com/v8/v8/commit/676c41321a948c08d6a43de43fe9b1d60ae81c00 Refs: https://github.com/nodejs/help/issues/917#issuecomment-339292642 Refs: https://bugs.chromium.org/p/chromium/issues/detail?id=771966 PR-URL: https://github.com/nodejs/node/pull/16490 Backport-PR-URL: https://github.com/nodejs/node/pull/16569 Reviewed-By: Franziska Hinkelmann Reviewed-By: Colin Ihrig Reviewed-By: Ali Ijaz Sheikh Reviewed-By: James M Snell Reviewed-By: Michael Dawson --- deps/v8/include/v8-version.h | 2 +- deps/v8/src/heap/heap.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/deps/v8/include/v8-version.h b/deps/v8/include/v8-version.h index 19adac702427b8..461af5e347d992 100644 --- a/deps/v8/include/v8-version.h +++ b/deps/v8/include/v8-version.h @@ -11,7 +11,7 @@ #define V8_MAJOR_VERSION 6 #define V8_MINOR_VERSION 1 #define V8_BUILD_NUMBER 534 -#define V8_PATCH_LEVEL 43 +#define V8_PATCH_LEVEL 44 // Use 1 for candidates and 0 otherwise. // (Boolean macro values are not supported by all preprocessors.) diff --git a/deps/v8/src/heap/heap.cc b/deps/v8/src/heap/heap.cc index 04de6ea6b6589d..62a5856f346137 100644 --- a/deps/v8/src/heap/heap.cc +++ b/deps/v8/src/heap/heap.cc @@ -1718,7 +1718,7 @@ void Heap::Scavenge() { if (mark_compact_collector()->sweeper().sweeping_in_progress() && memory_allocator_->unmapper()->NumberOfDelayedChunks() > - kMaxSemiSpaceSizeInKB / Page::kPageSize) { + static_cast(new_space_->MaximumCapacity() / Page::kPageSize)) { mark_compact_collector()->EnsureSweepingCompleted(); }