From 63ed0b8bfe3759f1b14fe3a805a33081b065288b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Tue, 12 Jan 2021 15:20:25 +0100 Subject: [PATCH] deps: V8: cherry-pick 9a6a22874c81 Original commit message: [heap] Fix DCHECK in TransitionArrayNeedsCompaction The dead target check in TransitionArrayNeedsCompaction, confirming that Smi (uninitialized) targets imply that no other target is dead, has to additionally support Smi entries. Bug: v8:11305 Change-Id: I6f3fa9e7420b1bd0a64a25dae670f439e3f41162 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2622914 Commit-Queue: Leszek Swirski Commit-Queue: Ulan Degenbaev Auto-Submit: Leszek Swirski Reviewed-by: Ulan Degenbaev Cr-Commit-Position: refs/heads/master@{#72040} Refs: https://github.com/v8/v8/commit/9a6a22874c814be0a3ad12065b386722df110df5 PR-URL: https://github.com/nodejs/node/pull/36139 Reviewed-By: Jiawen Geng Reviewed-By: Colin Ihrig Reviewed-By: Myles Borins Reviewed-By: Shelley Vohr --- common.gypi | 2 +- deps/v8/src/heap/mark-compact.cc | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/common.gypi b/common.gypi index ba6b791a6ccf82..c19346bffad434 100644 --- a/common.gypi +++ b/common.gypi @@ -36,7 +36,7 @@ # Reset this number to 0 on major V8 upgrades. # Increment by one for each non-official patch applied to deps/v8. - 'v8_embedder_string': '-node.9', + 'v8_embedder_string': '-node.10', ##### V8 defaults for Node.js ##### diff --git a/deps/v8/src/heap/mark-compact.cc b/deps/v8/src/heap/mark-compact.cc index ccd3116e3988c6..28f40d432b0305 100644 --- a/deps/v8/src/heap/mark-compact.cc +++ b/deps/v8/src/heap/mark-compact.cc @@ -2290,7 +2290,9 @@ bool MarkCompactCollector::TransitionArrayNeedsCompaction( #ifdef DEBUG // Targets can only be dead iff this array is fully deserialized. for (int i = 0; i < num_transitions; ++i) { - DCHECK(!non_atomic_marking_state()->IsWhite(transitions.GetTarget(i))); + DCHECK_IMPLIES( + !transitions.GetRawTarget(i).IsSmi(), + !non_atomic_marking_state()->IsWhite(transitions.GetTarget(i))); } #endif return false;