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

Unified Diff: runtime/vm/verifier.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/thread_test.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/verifier.cc
diff --git a/runtime/vm/verifier.cc b/runtime/vm/verifier.cc
index 3d4d54428c49b897dcd07990d12d1257dcb1e4ce..a1e8ca28a817ddbeeed2cc9d6b17e6b13d7ad277 100644
--- a/runtime/vm/verifier.cc
+++ b/runtime/vm/verifier.cc
@@ -65,15 +65,17 @@ void VerifyWeakPointersVisitor::VisitHandle(uword addr) {
}
void VerifyPointersVisitor::VerifyPointers(MarkExpectation mark_expectation) {
- NoSafepointScope no_safepoint;
Thread* thread = Thread::Current();
Isolate* isolate = thread->isolate();
+ HeapIterationScope iteration(thread);
StackZone stack_zone(thread);
ObjectSet* allocated_set = isolate->heap()->CreateAllocatedObjectSet(
stack_zone.GetZone(), mark_expectation);
+
VerifyPointersVisitor visitor(isolate, allocated_set);
// Visit all strongly reachable objects.
- isolate->IterateObjectPointers(&visitor, StackFrameIterator::kValidateFrames);
+ iteration.IterateObjectPointers(&visitor,
+ StackFrameIterator::kValidateFrames);
VerifyWeakPointersVisitor weak_visitor(&visitor);
// Visit weak handles and prologue weak handles.
isolate->VisitWeakPersistentHandles(&weak_visitor);
« no previous file with comments | « runtime/vm/thread_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698