Index: runtime/vm/service_isolate.cc |
diff --git a/runtime/vm/service_isolate.cc b/runtime/vm/service_isolate.cc |
index 923f6d4c43e65bca1d8e6fe09d7988606e95a499..a316c6ccc6c596db9fb503ada73f564447037ead 100644 |
--- a/runtime/vm/service_isolate.cc |
+++ b/runtime/vm/service_isolate.cc |
@@ -344,6 +344,7 @@ class RunServiceTask : public ThreadPool::Task { |
ASSERT(ServiceIsolate::IsServiceIsolate(I)); |
ServiceIsolate::SetServiceIsolate(NULL); |
ServiceIsolate::SetServicePort(ILLEGAL_PORT); |
+ I->WaitForOutstandingSpawns(); |
{ |
// Print the error if there is one. This may execute dart code to |
// print the exception object, so we need to use a StartIsolateScope. |