Index: runtime/vm/dart_api_impl.cc |
diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc |
index 8a9e31ecf3ecb99fbf2fba69486d8b3804c142d9..0f822e26ad0370827cff07e023df0ea0241c045d 100644 |
--- a/runtime/vm/dart_api_impl.cc |
+++ b/runtime/vm/dart_api_impl.cc |
@@ -1266,6 +1266,7 @@ DART_EXPORT void Dart_ShutdownIsolate() { |
Thread* T = Thread::Current(); |
Isolate* I = T->isolate(); |
CHECK_ISOLATE(I); |
+ I->WaitForOutstandingSpawns(); |
{ |
StackZone zone(T); |
HandleScope handle_scope(T); |