diff --git a/common.gypi b/common.gypi index 39229ef58787..2967d1e63a48 100644 --- a/common.gypi +++ b/common.gypi @@ -44,7 +44,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.39', + 'v8_embedder_string': '-node.40', ##### V8 defaults for Node.js ##### diff --git a/deps/v8/src/heap/mark-compact.cc b/deps/v8/src/heap/mark-compact.cc index 90bf197a8c76..adf8f97f3b54 100644 --- a/deps/v8/src/heap/mark-compact.cc +++ b/deps/v8/src/heap/mark-compact.cc @@ -2536,17 +2536,7 @@ void MarkCompactCollector::RetainMaps() { MarkingHelper::WorklistTarget::kRegular, map); } } - Tagged prototype = map->prototype(); - if (age > 0 && IsHeapObject(prototype) && - MarkingHelper::IsUnmarkedAndNotAlwaysLive( - heap_, marking_state_, Cast(prototype))) { - // The prototype is not marked, age the map. - new_age = age - 1; - } else { - // The prototype and the constructor are marked, this map keeps only - // transition tree alive, not JSObjects. Do not age the map. - new_age = age; - } + new_age = age > 0 ? age - 1 : 0; } else { new_age = v8_flags.retain_maps_for_n_gc; }