Chromium Code Reviews| 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); |
|
Ivan Posva
2014/10/06 18:38:08
How about?
... object_visitor(
isolate(), allo
koda
2014/10/06 19:24:30
Done.
|
| + 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; |