diff --git a/runtime/vm/thread.cc b/runtime/vm/thread.cc index 7fb03168963..1dc55d5a049 100644 --- a/runtime/vm/thread.cc +++ b/runtime/vm/thread.cc @@ -1373,6 +1373,10 @@ void Thread::UnwindScopes(uword stack_marker) { } void Thread::HandleStolen() { + { + // To make sure we're sequenced after MarkWorkerAsBlocked. + MonitorLocker ml(isolate_group()->thread_registry()->threads_lock()); + } isolate_group()->IncreaseMutatorCount(this, /*is_nested_reenter=*/false, /*was_stolen=*/true); }