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

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

Issue 1474603003: Move tar archive parsing to C++ (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address comments Created 5 years 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
« no previous file with comments | « no previous file | runtime/lib/vmservice.cc » ('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:collection';
8 import 'dart:convert'; 9 import 'dart:convert';
9 import 'dart:io'; 10 import 'dart:io';
10 import 'dart:isolate'; 11 import 'dart:isolate';
11 import 'dart:_vmservice'; 12 import 'dart:_vmservice';
12 13
13 part 'loader.dart'; 14 part 'loader.dart';
14 part 'server.dart'; 15 part 'server.dart';
15 16
16 // The TCP ip/port that the HTTP server listens on. 17 // The TCP ip/port that the HTTP server listens on.
17 int _port; 18 int _port;
18 String _ip; 19 String _ip;
19 // Should the HTTP server auto start? 20 // Should the HTTP server auto start?
20 bool _autoStart; 21 bool _autoStart;
21 22
22 bool _isWindows = false; 23 bool _isWindows = false;
23 24
24 var _signalWatch; 25 var _signalWatch;
25 var _signalSubscription; 26 var _signalSubscription;
26 27
27 // HTTP server. 28 // HTTP server.
28 Server server; 29 Server server;
29 Future<Server> serverFuture; 30 Future<Server> serverFuture;
30 Map<String, Asset> assets; 31 HashMap<String, Asset> assets;
31 32
32 _onShutdown() { 33 _onShutdown() {
33 if (server != null) { 34 if (server != null) {
34 server.close(true).catchError((e, st) { 35 server.close(true).catchError((e, st) {
35 print("Error in vm-service shutdown: $e\n$st\n"); 36 print("Error in vm-service shutdown: $e\n$st\n");
36 }); 37 });
37 } 38 }
38 if (_signalSubscription != null) { 39 if (_signalSubscription != null) {
39 _signalSubscription.cancel(); 40 _signalSubscription.cancel();
40 _signalSubscription = null; 41 _signalSubscription = null;
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 // else { 101 // else {
101 // var service = new VMService(); 102 // var service = new VMService();
102 // service.onShutdown = _onShutdown; 103 // service.onShutdown = _onShutdown;
103 // } 104 // }
104 scriptLoadPort.handler = _processLoadRequest; 105 scriptLoadPort.handler = _processLoadRequest;
105 // Register signal handler after a small delay to avoid stalling main 106 // Register signal handler after a small delay to avoid stalling main
106 // isolate startup. 107 // isolate startup.
107 new Timer(_shortDelay, _registerSignalHandler); 108 new Timer(_shortDelay, _registerSignalHandler);
108 return scriptLoadPort; 109 return scriptLoadPort;
109 } 110 }
OLDNEW
« no previous file with comments | « no previous file | runtime/lib/vmservice.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698