Chromium Code Reviews| Index: runtime/vm/isolate.cc |
| diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc |
| index 4b1124785de7ad9019f6e452420de901fca1c876..50caaffe0f82bb9e0419508450f5abb4eae9ca40 100644 |
| --- a/runtime/vm/isolate.cc |
| +++ b/runtime/vm/isolate.cc |
| @@ -2592,6 +2592,9 @@ void Isolate::UnscheduleThread(Thread* thread, |
| // so we create a MonitorLocker object which does not do any |
| // no_safepoint_scope_depth increments/decrements. |
| MonitorLocker ml(threads_lock(), false); |
| + if (is_mutator) { |
| + thread->isolate()->object_store()->SetStickyErrorFromThread(thread); |
| + } |
|
siva
2016/03/09 07:07:51
Could you add a comment here
|
| if (!bypass_safepoint) { |
| // Ensure that the thread reports itself as being at a safepoint. |
| thread->EnterSafepoint(); |
| @@ -2610,6 +2613,7 @@ void Isolate::UnscheduleThread(Thread* thread, |
| thread->set_execution_state(Thread::kThreadInVM); |
| thread->set_safepoint_state(0); |
| thread->clear_pending_functions(); |
| + thread->clear_sticky_error(); |
| ASSERT(thread->no_safepoint_scope_depth() == 0); |
| // Return thread structure. |
| thread_registry()->ReturnThreadLocked(is_mutator, thread); |