Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(268)

Unified Diff: runtime/vm/symbols.cc

Issue 2995543004: [vm, gc] Require a safepoint for heap iteration. (Closed)
Patch Set: . Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: runtime/vm/symbols.cc
diff --git a/runtime/vm/symbols.cc b/runtime/vm/symbols.cc
index d38b259b1a768c4f52f15c517cfeea4b4bebc8da..7001674db5236f98818e087937d38642b3afc62d 100644
--- a/runtime/vm/symbols.cc
+++ b/runtime/vm/symbols.cc
@@ -369,8 +369,11 @@ void Symbols::Compact(Isolate* isolate) {
Zone* zone_;
};
- SymbolCollector visitor(Thread::Current(), &symbols);
- isolate->heap()->IterateObjects(&visitor);
+ {
+ HeapIterationScope iteration;
+ SymbolCollector visitor(Thread::Current(), &symbols);
+ iteration.IterateObjects(&visitor);
+ }
// 3. Build a new table from the surviving symbols.
Array& array = Array::Handle(

Powered by Google App Engine
This is Rietveld 408576698