Index: runtime/vm/symbols.cc |
diff --git a/runtime/vm/symbols.cc b/runtime/vm/symbols.cc |
index d38b259b1a768c4f52f15c517cfeea4b4bebc8da..f4e0df36b38294fb95707fb136fe4b485317eae7 100644 |
--- a/runtime/vm/symbols.cc |
+++ b/runtime/vm/symbols.cc |
@@ -369,8 +369,12 @@ void Symbols::Compact(Isolate* isolate) { |
Zone* zone_; |
}; |
- SymbolCollector visitor(Thread::Current(), &symbols); |
- isolate->heap()->IterateObjects(&visitor); |
+ { |
+ Thread* thread = Thread::Current(); |
+ HeapIterationScope iteration(thread); |
+ SymbolCollector visitor(thread, &symbols); |
+ iteration.IterateObjects(&visitor); |
+ } |
// 3. Build a new table from the surviving symbols. |
Array& array = Array::Handle( |