Index: runtime/vm/gc_sweeper.cc |
=================================================================== |
--- runtime/vm/gc_sweeper.cc (revision 45808) |
+++ runtime/vm/gc_sweeper.cc (working copy) |
@@ -113,7 +113,7 @@ |
} |
virtual void Run() { |
- Thread::EnterIsolate(task_isolate_); |
+ Thread::EnterIsolateAsHelper(task_isolate_); |
GCSweeper sweeper; |
HeapPage* page = first_; |
@@ -143,8 +143,7 @@ |
old_space_->set_tasks(old_space_->tasks() - 1); |
ml.Notify(); |
} |
- Thread::ExitIsolate(); |
- delete task_isolate_; |
+ Thread::ExitIsolateAsHelper(); |
} |
private: |
@@ -161,7 +160,7 @@ |
HeapPage* last, |
FreeList* freelist) { |
SweeperTask* task = |
- new SweeperTask(isolate->ShallowCopy(), |
+ new SweeperTask(isolate, |
isolate->heap()->old_space(), |
first, last, |
freelist); |