| Index: runtime/vm/dart_api_state.cc
|
| diff --git a/runtime/vm/dart_api_state.cc b/runtime/vm/dart_api_state.cc
|
| index be30a2d5d5258a24423ce38af1ecc3ae4d4a7631..ed6ac3ed19e2671b5fc6fcd46e12ff721ce4da2c 100644
|
| --- a/runtime/vm/dart_api_state.cc
|
| +++ b/runtime/vm/dart_api_state.cc
|
| @@ -19,9 +19,9 @@ BackgroundFinalizer::BackgroundFinalizer(Isolate* isolate,
|
| isolate_(isolate),
|
| queue_(queue) {
|
| ASSERT(FLAG_background_finalization);
|
| - MonitorLocker ml(isolate->heap()->finalization_tasks_lock());
|
| - isolate->heap()->set_finalization_tasks(
|
| - isolate->heap()->finalization_tasks() + 1);
|
| + PageSpace* old_space = isolate->heap()->old_space();
|
| + MonitorLocker ml(old_space->tasks_lock());
|
| + old_space->set_tasks(old_space->tasks() + 1);
|
| ml.Notify();
|
| }
|
|
|
| @@ -46,9 +46,9 @@ void BackgroundFinalizer::Run() {
|
| Thread::ExitIsolateAsHelper();
|
|
|
| {
|
| - Heap* heap = isolate_->heap();
|
| - MonitorLocker ml(heap->finalization_tasks_lock());
|
| - heap->set_finalization_tasks(heap->finalization_tasks() - 1);
|
| + PageSpace* old_space = isolate_->heap()->old_space();
|
| + MonitorLocker ml(old_space->tasks_lock());
|
| + old_space->set_tasks(old_space->tasks() - 1);
|
| ml.Notify();
|
| }
|
| }
|
|
|