Commit 4fa691ed authored by Leszek Swirski's avatar Leszek Swirski Committed by Commit Bot

[heap] Skip StringTable iteration if skipping old

Since the StringTable can only contain old strings, skip iterating it
when SkipRoot::kOldGeneration is set.

Bug: chromium:1115132, chromium:1115100
Change-Id: I6d065a0ea7f3142c5d474eb0919e801e13976f6c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2351664
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69353}
parent c32a3106
......@@ -4396,9 +4396,10 @@ void Heap::set_builtin(int index, Code builtin) {
void Heap::IterateWeakRoots(RootVisitor* v, base::EnumSet<SkipRoot> options) {
DCHECK(!options.contains(SkipRoot::kWeak));
if (!options.contains(SkipRoot::kUnserializable)) {
if (!options.contains(SkipRoot::kOldGeneration) &&
!options.contains(SkipRoot::kUnserializable)) {
// Do not visit for serialization, since the string table is custom
// serialized.
// serialized. Also do not visit if we are skipping old generation.
isolate()->string_table()->IterateElements(v);
}
v->Synchronize(VisitorSynchronization::kStringTable);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment