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

Unified Diff: runtime/vm/heap.cc

Issue 630933002: Check mark bit when verifying heap. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 2 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/heap.cc
===================================================================
--- runtime/vm/heap.cc (revision 40925)
+++ runtime/vm/heap.cc (working copy)
@@ -460,7 +460,8 @@
}
-ObjectSet* Heap::CreateAllocatedObjectSet() const {
+ObjectSet* Heap::CreateAllocatedObjectSet(
+ MarkExpectation mark_expectation) const {
uword start = static_cast<uword>(-1);
uword end = 0;
Isolate* vm_isolate = Dart::vm_isolate();
@@ -468,17 +469,23 @@
this->GetMergedAddressRange(&start, &end);
ObjectSet* allocated_set = new ObjectSet(start, end);
-
- VerifyObjectVisitor object_visitor(isolate(), allocated_set);
- this->IterateObjects(&object_visitor);
- vm_isolate->heap()->IterateObjects(&object_visitor);
-
+ {
+ VerifyObjectVisitor object_visitor(
+ isolate(), allocated_set, mark_expectation);
+ this->IterateObjects(&object_visitor);
+ }
+ {
+ // VM isolate heap is premarked.
+ VerifyObjectVisitor vm_object_visitor(
+ isolate(), allocated_set, kRequireMarked);
+ vm_isolate->heap()->IterateObjects(&vm_object_visitor);
+ }
return allocated_set;
}
-bool Heap::Verify() const {
- ObjectSet* allocated_set = CreateAllocatedObjectSet();
+bool Heap::Verify(MarkExpectation mark_expectation) const {
+ ObjectSet* allocated_set = CreateAllocatedObjectSet(mark_expectation);
VerifyPointersVisitor visitor(isolate(), allocated_set);
IteratePointers(&visitor);
delete allocated_set;
« 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