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

Side by Side Diff: pkg/analyzer/lib/src/services/runtime/coverage/coverage_impl.dart

Issue 135593009: Fixes for exit problems. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 10 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 | « pkg/analyzer/bin/analyzer.dart ('k') | no next file » | 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 /// A library for code coverage support for Dart. 5 /// A library for code coverage support for Dart.
6 library runtime.coverage.impl; 6 library runtime.coverage.impl;
7 7
8 import 'dart:async'; 8 import 'dart:async';
9 import 'dart:collection' show SplayTreeMap; 9 import 'dart:collection' show SplayTreeMap;
10 import 'dart:io'; 10 import 'dart:io';
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 } 112 }
113 113
114 String getFilePath(Uri uri) { 114 String getFilePath(Uri uri) {
115 var path = uri.path; 115 var path = uri.path;
116 path = pathos.joinAll(uri.pathSegments); 116 path = pathos.joinAll(uri.pathSegments);
117 path = pathos.join(basePath, path); 117 path = pathos.join(basePath, path);
118 return pathos.normalize(path); 118 return pathos.normalize(path);
119 } 119 }
120 120
121 Future sendFile(HttpRequest request, File file) { 121 Future sendFile(HttpRequest request, File file) {
122 file.resolveSymbolicLinks().then((fullPath) { 122 return file.resolveSymbolicLinks().then((fullPath) {
123 return file.openRead().pipe(request.response); 123 return file.openRead().pipe(request.response);
124 }); 124 });
125 } 125 }
126 126
127 bool shouldRewriteFile(String path); 127 bool shouldRewriteFile(String path);
128 128
129 /// Subclasses implement this method to rewrite the provided [code] of the 129 /// Subclasses implement this method to rewrite the provided [code] of the
130 /// file with [path]. Returns some content or `null` if file content 130 /// file with [path]. Returns some content or `null` if file content
131 /// should be requested. 131 /// should be requested.
132 String rewritePathContent(String path); 132 String rewritePathContent(String path);
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 var lastOffset = 0; 330 var lastOffset = 0;
331 offsetFragmentMap.forEach((offset, fragment) { 331 offsetFragmentMap.forEach((offset, fragment) {
332 sb.write(_code.substring(lastOffset, offset)); 332 sb.write(_code.substring(lastOffset, offset));
333 sb.write(fragment); 333 sb.write(fragment);
334 lastOffset = offset; 334 lastOffset = offset;
335 }); 335 });
336 sb.write(_code.substring(lastOffset, _code.length)); 336 sb.write(_code.substring(lastOffset, _code.length));
337 return sb.toString(); 337 return sb.toString();
338 } 338 }
339 } 339 }
OLDNEW
« no previous file with comments | « pkg/analyzer/bin/analyzer.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698