| Index: runtime/vm/isolate.cc
|
| diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc
|
| index 472188815767f86838873e44f3d70fddd2201d95..e515a57add7d24707380915c90ab76ae94b087e2 100644
|
| --- a/runtime/vm/isolate.cc
|
| +++ b/runtime/vm/isolate.cc
|
| @@ -2570,6 +2570,10 @@ Thread* Isolate::ScheduleThread(bool is_mutator, bool bypass_safepoint) {
|
| os_thread->set_thread(thread);
|
| if (is_mutator) {
|
| scheduled_mutator_thread_ = thread;
|
| + if (this != Dart::vm_isolate()) {
|
| + scheduled_mutator_thread_->set_top(heap()->new_space()->top());
|
| + scheduled_mutator_thread_->set_end(heap()->new_space()->end());
|
| + }
|
| }
|
| Thread::SetCurrent(thread);
|
| os_thread->EnableThreadInterrupts();
|
| @@ -2608,6 +2612,12 @@ void Isolate::UnscheduleThread(Thread* thread,
|
| os_thread->set_thread(NULL);
|
| OSThread::SetCurrent(os_thread);
|
| if (is_mutator) {
|
| + if (this != Dart::vm_isolate()) {
|
| + heap()->new_space()->set_top(scheduled_mutator_thread_->top_);
|
| + heap()->new_space()->set_end(scheduled_mutator_thread_->end_);
|
| + }
|
| + scheduled_mutator_thread_->top_ = 0;
|
| + scheduled_mutator_thread_->end_ = 0;
|
| scheduled_mutator_thread_ = NULL;
|
| }
|
| thread->isolate_ = NULL;
|
|
|