Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1349)

Unified Diff: runtime/bin/vmservice/vmservice_io.dart

Issue 1998963003: Rework standalone to use a synchronous loader that does not invoke Dart code (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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.

Powered by Google App Engine
This is Rietveld 408576698