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

Unified Diff: runtime/vm/symbols.cc

Issue 2995543004: [vm, gc] Require a safepoint for heap iteration. (Closed)
Patch Set: explicit-thread 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
« no previous file with comments | « runtime/vm/stack_frame_test.cc ('k') | runtime/vm/thread_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(
« no previous file with comments | « runtime/vm/stack_frame_test.cc ('k') | runtime/vm/thread_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698