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

Unified Diff: runtime/vm/object_graph.cc

Issue 1181943002: Assert no allocation during heap iteration; fix unsafe iteration in ObjectGraph. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: spelling fix Created 5 years, 6 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/heap.h ('k') | runtime/vm/pages.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object_graph.cc
diff --git a/runtime/vm/object_graph.cc b/runtime/vm/object_graph.cc
index 773839dd16be356ec2be5035b7198de8c85c25ac..f50046896face8357917abecee537691a61c7f61 100644
--- a/runtime/vm/object_graph.cc
+++ b/runtime/vm/object_graph.cc
@@ -147,6 +147,11 @@ class Unmarker : public ObjectVisitor {
}
static void UnmarkAll(Isolate* isolate) {
+ PageSpace* old_space = isolate->heap()->old_space();
+ MonitorLocker ml(old_space->tasks_lock());
+ while (old_space->tasks() > 0) {
+ ml.Wait();
+ }
Unmarker unmarker(isolate);
isolate->heap()->VisitObjects(&unmarker);
}
« no previous file with comments | « runtime/vm/heap.h ('k') | runtime/vm/pages.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698