| Index: runtime/bin/vmservice/vmservice_io.dart
|
| diff --git a/runtime/bin/vmservice/vmservice_io.dart b/runtime/bin/vmservice/vmservice_io.dart
|
| index ba8244111ab2a0cc16aeb85d2ef1bd45e9bd19c4..b15aeb673048ab1a3268042193ac2fcf1a4a0e99 100644
|
| --- a/runtime/bin/vmservice/vmservice_io.dart
|
| +++ b/runtime/bin/vmservice/vmservice_io.dart
|
| @@ -39,6 +39,7 @@ _lazyServerBoot() {
|
| }
|
|
|
| Future cleanupCallback() async {
|
| + shutdownLoaders();
|
| // Cancel the sigquit subscription.
|
| if (_signalSubscription != null) {
|
| await _signalSubscription.cancel();
|
| @@ -88,6 +89,9 @@ _registerSignalHandler() {
|
| main() {
|
| // Set embedder hooks.
|
| VMServiceEmbedderHooks.cleanup = cleanupCallback;
|
| + // Always instantiate the vmservice object so that the exit message
|
| + // can be delivered and waiting loaders can be cancelled.
|
| + var service = new VMService();
|
| if (_autoStart) {
|
| _lazyServerBoot();
|
| server.startup();
|
| @@ -95,8 +99,6 @@ main() {
|
| // scheduled microtasks.
|
| Timer.run(() {});
|
| }
|
| - // TODO(johnmccutchan): Fixup service isolate shutdown in the general case.
|
| - // See ServiceIsolate::KillServiceIsolate and ServiceIsolate::Shutdown.
|
| scriptLoadPort.handler = _processLoadRequest;
|
| // Register signal handler after a small delay to avoid stalling main
|
| // isolate startup.
|
|
|