Index: runtime/vm/scavenger.cc |
diff --git a/runtime/vm/scavenger.cc b/runtime/vm/scavenger.cc |
index f526af1b6b2165e9f680dbabf47639309003874e..c2822b547e7135461da587c16ded3a73378112f5 100644 |
--- a/runtime/vm/scavenger.cc |
+++ b/runtime/vm/scavenger.cc |
@@ -258,9 +258,10 @@ class ScavengerWeakVisitor : public HandleVisitor { |
// 'prologue_weak_were_strong' is currently only used for sanity checking. |
explicit ScavengerWeakVisitor(Scavenger* scavenger, |
bool prologue_weak_were_strong) |
- : HandleVisitor(scavenger->heap_->isolate()), |
+ : HandleVisitor(Thread::Current()), |
scavenger_(scavenger), |
prologue_weak_were_strong_(prologue_weak_were_strong) { |
+ ASSERT(scavenger->heap_->isolate() == Thread::Current()->isolate()); |
} |
void VisitHandle(uword addr) { |
@@ -270,9 +271,9 @@ class ScavengerWeakVisitor : public HandleVisitor { |
if (scavenger_->IsUnreachable(p)) { |
ASSERT(!handle->IsPrologueWeakPersistent() || |
!prologue_weak_were_strong_); |
- handle->UpdateUnreachable(isolate()); |
+ handle->UpdateUnreachable(thread()->isolate()); |
} else { |
- handle->UpdateRelocated(isolate()); |
+ handle->UpdateRelocated(thread()->isolate()); |
} |
} |