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

Side by Side Diff: runtime/bin/vmservice/vmservice_io.dart

Issue 1035943005: Clean up observatory testing processes when we are done with them. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/observatory/test/test_helper.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library vmservice_io; 5 library vmservice_io;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:convert'; 8 import 'dart:convert';
9 import 'dart:io'; 9 import 'dart:io';
10 import 'dart:isolate'; 10 import 'dart:isolate';
(...skipping 13 matching lines...) Expand all
24 24
25 var _signalWatch; 25 var _signalWatch;
26 var _signalSubscription; 26 var _signalSubscription;
27 27
28 // HTTP servr. 28 // HTTP servr.
29 Server server; 29 Server server;
30 Future<Server> serverFuture; 30 Future<Server> serverFuture;
31 31
32 _onShutdown() { 32 _onShutdown() {
33 if (server != null) { 33 if (server != null) {
34 server.close(true).catchError((e, st) => assert(e)); 34 server.close(true).catchError((e, st) {
35 print("Error in vm-service: $e\n$st\nExiting...");
Ivan Posva 2015/03/27 07:51:36 How about "Error in vm-service shutdown"? To make
turnidge 2015/03/27 16:01:37 Done.
36 });
35 } 37 }
36 if (_signalSubscription != null) { 38 if (_signalSubscription != null) {
37 _signalSubscription.cancel(); 39 _signalSubscription.cancel();
38 _signalSubscription = null; 40 _signalSubscription = null;
39 } 41 }
40 } 42 }
41 43
42 _bootServer() { 44 _bootServer() {
43 // Load resources. 45 // Load resources.
44 _triggerResourceLoad(); 46 _triggerResourceLoad();
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 // It's just here to push an event on the event loop so that we invoke the 88 // It's just here to push an event on the event loop so that we invoke the
87 // scheduled microtasks. 89 // scheduled microtasks.
88 Timer.run(() {}); 90 Timer.run(() {});
89 } 91 }
90 scriptLoadPort.handler = _processLoadRequest; 92 scriptLoadPort.handler = _processLoadRequest;
91 // Register signal handler after a small delay to avoid stalling main 93 // Register signal handler after a small delay to avoid stalling main
92 // isolate startup. 94 // isolate startup.
93 new Timer(_shortDelay, _registerSignalHandler); 95 new Timer(_shortDelay, _registerSignalHandler);
94 return scriptLoadPort; 96 return scriptLoadPort;
95 } 97 }
OLDNEW
« no previous file with comments | « no previous file | runtime/observatory/test/test_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698