Index: runtime/vm/isolate.cc |
diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc |
index 70cca1ab368e7c03d20569c3f4be49ce83ecb902..8126882dc38fdcfe146d96424d96c3060e0261e1 100644 |
--- a/runtime/vm/isolate.cc |
+++ b/runtime/vm/isolate.cc |
@@ -2603,6 +2603,7 @@ void Isolate::UnscheduleThread(Thread* thread, |
thread->set_os_thread(NULL); |
thread->set_execution_state(Thread::kThreadInVM); |
thread->set_safepoint_state(0); |
+ thread->clear_pending_functions(); |
ASSERT(thread->no_safepoint_scope_depth() == 0); |
// Return thread structure. |
thread_registry()->ReturnThreadLocked(is_mutator, thread); |