Index: src/heap/heap.cc |
diff --git a/src/heap/heap.cc b/src/heap/heap.cc |
index 18f2ef4ee53a389932f75bc2dc213ac1b5049438..4e7ffd96cb75c277131351ba8bd273e07a48857b 100644 |
--- a/src/heap/heap.cc |
+++ b/src/heap/heap.cc |
@@ -1872,7 +1872,7 @@ void Heap::VisitExternalResources(v8::ExternalResourceVisitor* visitor) { |
v8::ExternalResourceVisitor* visitor_; |
} external_string_table_visitor(visitor); |
- external_string_table_.Iterate(&external_string_table_visitor); |
+ external_string_table_.IterateAll(&external_string_table_visitor); |
} |
Address Heap::DoScavenge(ObjectVisitor* scavenge_visitor, |
@@ -4831,7 +4831,7 @@ void Heap::IterateWeakRoots(ObjectVisitor* v, VisitMode mode) { |
v->Synchronize(VisitorSynchronization::kStringTable); |
if (mode != VISIT_ALL_IN_SCAVENGE && mode != VISIT_ALL_IN_SWEEP_NEWSPACE) { |
// Scavenge collections have special processing for this. |
- external_string_table_.Iterate(v); |
+ external_string_table_.IterateAll(v); |
} |
v->Synchronize(VisitorSynchronization::kExternalStringsTable); |
} |
@@ -6322,7 +6322,7 @@ void Heap::UpdateTotalGCTime(double duration) { |
} |
} |
-void Heap::ExternalStringTable::CleanUp() { |
+void Heap::ExternalStringTable::CleanUpNewSpaceStrings() { |
int last = 0; |
Isolate* isolate = heap_->isolate(); |
for (int i = 0; i < new_space_strings_.length(); ++i) { |
@@ -6338,8 +6338,12 @@ void Heap::ExternalStringTable::CleanUp() { |
} |
new_space_strings_.Rewind(last); |
new_space_strings_.Trim(); |
+} |
- last = 0; |
+void Heap::ExternalStringTable::CleanUpAll() { |
+ CleanUpNewSpaceStrings(); |
+ int last = 0; |
+ Isolate* isolate = heap_->isolate(); |
for (int i = 0; i < old_space_strings_.length(); ++i) { |
if (old_space_strings_[i]->IsTheHole(isolate)) { |
continue; |