Commit a11b12bb authored by Rodrigo Bruno's avatar Rodrigo Bruno Committed by Commit Bot

[heap] Fixed code to avoid repeated strings in the external string table.

Change-Id: Ic32383b9a4116b8f05568d7e8e0ca70a18813cea
Reviewed-on: https://chromium-review.googlesource.com/1121458Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Commit-Queue: Rodrigo Bruno <rfbpb@google.com>
Cr-Commit-Position: refs/heads/master@{#54125}
parent 870e81a2
......@@ -5333,10 +5333,9 @@ void Heap::ExternalStringTable::CleanUpNewSpaceStrings() {
if (o->IsTheHole(isolate)) {
continue;
}
if (o->IsThinString()) {
o = ThinString::cast(o)->actual();
if (!o->IsExternalString()) continue;
}
// The real external string is already in one of these vectors and was or
// will be processed. Re-processing it will add a duplicate to the vector.
if (o->IsThinString()) continue;
DCHECK(o->IsExternalString());
if (heap_->InNewSpace(o)) {
new_space_strings_[last++] = o;
......@@ -5356,10 +5355,9 @@ void Heap::ExternalStringTable::CleanUpAll() {
if (o->IsTheHole(isolate)) {
continue;
}
if (o->IsThinString()) {
o = ThinString::cast(o)->actual();
if (!o->IsExternalString()) continue;
}
// The real external string is already in one of these vectors and was or
// will be processed. Re-processing it will add a duplicate to the vector.
if (o->IsThinString()) continue;
DCHECK(o->IsExternalString());
DCHECK(!heap_->InNewSpace(o));
old_space_strings_[last++] = o;
......
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