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

Side by Side Diff: pkg/analysis_server/lib/src/analysis_server.dart

Issue 814453003: Ensure shutdown is always called (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 analysis.server; 5 library analysis.server;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:collection'; 8 import 'dart:collection';
9 9
10 import 'package:analysis_server/src/analysis_logger.dart'; 10 import 'package:analysis_server/src/analysis_logger.dart';
(...skipping 804 matching lines...) Expand 10 before | Expand all | Expand 10 after
815 815
816 void shutdown() { 816 void shutdown() {
817 running = false; 817 running = false;
818 if (index != null) { 818 if (index != null) {
819 index.clear(); 819 index.clear();
820 index.stop(); 820 index.stop();
821 } 821 }
822 // Defer closing the channel and shutting down the instrumentation server so 822 // Defer closing the channel and shutting down the instrumentation server so
823 // that the shutdown response can be sent and logged. 823 // that the shutdown response can be sent and logged.
824 new Future(() { 824 new Future(() {
825 instrumentationService.shutdown();
825 channel.close(); 826 channel.close();
826 instrumentationService.shutdown();
827 }); 827 });
828 } 828 }
829 829
830 /** 830 /**
831 * Implementation for `analysis.updateContent`. 831 * Implementation for `analysis.updateContent`.
832 */ 832 */
833 void updateContent(String id, Map<String, dynamic> changes) { 833 void updateContent(String id, Map<String, dynamic> changes) {
834 changes.forEach((file, change) { 834 changes.forEach((file, change) {
835 AnalysisContext analysisContext = getAnalysisContext(file); 835 AnalysisContext analysisContext = getAnalysisContext(file);
836 // TODO(paulberry): handle the case where a file is referred to by more 836 // TODO(paulberry): handle the case where a file is referred to by more
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
1067 * [packageUriResolver]. 1067 * [packageUriResolver].
1068 */ 1068 */
1069 SourceFactory _createSourceFactory(UriResolver packageUriResolver) { 1069 SourceFactory _createSourceFactory(UriResolver packageUriResolver) {
1070 List<UriResolver> resolvers = <UriResolver>[ 1070 List<UriResolver> resolvers = <UriResolver>[
1071 new DartUriResolver(analysisServer.defaultSdk), 1071 new DartUriResolver(analysisServer.defaultSdk),
1072 new ResourceUriResolver(resourceProvider), 1072 new ResourceUriResolver(resourceProvider),
1073 packageUriResolver]; 1073 packageUriResolver];
1074 return new SourceFactory(resolvers); 1074 return new SourceFactory(resolvers);
1075 } 1075 }
1076 } 1076 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/lib/driver.dart ('k') | pkg/analyzer/lib/instrumentation/instrumentation.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698