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

Unified Diff: runtime/vm/scavenger.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/safepoint.cc ('k') | runtime/vm/service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/scavenger.cc
diff --git a/runtime/vm/scavenger.cc b/runtime/vm/scavenger.cc
index 32d62e000906025ed067aaa6032adfd2f326b1a0..6e34bd0fa65fabbc9fa9afaffb19fbf255f12812 100644
--- a/runtime/vm/scavenger.cc
+++ b/runtime/vm/scavenger.cc
@@ -731,6 +731,8 @@ void Scavenger::FlushTLS() const {
}
void Scavenger::VisitObjectPointers(ObjectPointerVisitor* visitor) const {
+ ASSERT(Thread::Current()->IsAtSafepoint() ||
+ (Thread::Current()->task_kind() == Thread::kMarkerTask));
FlushTLS();
uword cur = FirstObjectStart();
while (cur < top_) {
@@ -740,6 +742,8 @@ void Scavenger::VisitObjectPointers(ObjectPointerVisitor* visitor) const {
}
void Scavenger::VisitObjects(ObjectVisitor* visitor) const {
+ ASSERT(Thread::Current()->IsAtSafepoint() ||
+ (Thread::Current()->task_kind() == Thread::kMarkerTask));
FlushTLS();
uword cur = FirstObjectStart();
while (cur < top_) {
« no previous file with comments | « runtime/vm/safepoint.cc ('k') | runtime/vm/service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698