Index: runtime/vm/gc_sweeper.cc |
diff --git a/runtime/vm/gc_sweeper.cc b/runtime/vm/gc_sweeper.cc |
index a192138b4c6f5a72ddf92f2360cb4ea8c7ded1e4..0dcf62fb276c7b944f512602fd4847b59aaf6d27 100644 |
--- a/runtime/vm/gc_sweeper.cc |
+++ b/runtime/vm/gc_sweeper.cc |
@@ -9,8 +9,8 @@ |
#include "vm/heap.h" |
#include "vm/lockers.h" |
#include "vm/pages.h" |
+#include "vm/safepoint.h" |
#include "vm/thread_pool.h" |
-#include "vm/thread_registry.h" |
namespace dart { |
@@ -116,13 +116,14 @@ class SweeperTask : public ThreadPool::Task { |
virtual void Run() { |
bool result = Thread::EnterIsolateAsHelper(task_isolate_); |
ASSERT(result); |
+ Thread* thread = Thread::Current(); |
GCSweeper sweeper; |
HeapPage* page = first_; |
HeapPage* prev_page = NULL; |
while (page != NULL) { |
- task_isolate_->thread_registry()->CheckSafepoint(); |
+ thread->CheckForSafepoint(); |
HeapPage* next_page = page->next(); |
ASSERT(page->type() == HeapPage::kData); |
bool page_in_use = sweeper.SweepPage(page, freelist_, false); |