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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/source_file_provider.dart

Issue 288703003: Revert revisions 36163 and 36162 (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 7 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
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 source_file_provider; 5 library source_file_provider;
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 10
(...skipping 26 matching lines...) Expand all
37 } 37 }
38 38
39 Future<List<int>> readUtf8BytesFromUri(Uri resourceUri) { 39 Future<List<int>> readUtf8BytesFromUri(Uri resourceUri) {
40 if (resourceUri.scheme != 'file') { 40 if (resourceUri.scheme != 'file') {
41 throw new ArgumentError("Unknown scheme in uri '$resourceUri'"); 41 throw new ArgumentError("Unknown scheme in uri '$resourceUri'");
42 } 42 }
43 List<int> source; 43 List<int> source;
44 try { 44 try {
45 source = readAll(resourceUri.toFilePath()); 45 source = readAll(resourceUri.toFilePath());
46 } on FileSystemException catch (ex) { 46 } on FileSystemException catch (ex) {
47 sourceFiles[resourceUri.toString()] = null;
48 return new Future.error( 47 return new Future.error(
49 "Error reading '${relativize(cwd, resourceUri, isWindows)}' " 48 "Error reading '${relativize(cwd, resourceUri, isWindows)}' "
50 "(${ex.osError})"); 49 "(${ex.osError})");
51 } 50 }
52 dartCharactersRead += source.length; 51 dartCharactersRead += source.length;
53 sourceFiles[resourceUri.toString()] = new Utf8BytesSourceFile( 52 sourceFiles[resourceUri.toString()] = new Utf8BytesSourceFile(
54 relativize(cwd, resourceUri, isWindows), source); 53 relativize(cwd, resourceUri, isWindows), source);
55 return new Future.value(source); 54 return new Future.value(source);
56 } 55 }
57 56
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 if (fatal && throwOnError) { 164 if (fatal && throwOnError) {
166 isAborting = true; 165 isAborting = true;
167 throw new AbortLeg(message); 166 throw new AbortLeg(message);
168 } 167 }
169 } 168 }
170 169
171 void call(Uri uri, int begin, int end, String message, api.Diagnostic kind) { 170 void call(Uri uri, int begin, int end, String message, api.Diagnostic kind) {
172 return diagnosticHandler(uri, begin, end, message, kind); 171 return diagnosticHandler(uri, begin, end, message, kind);
173 } 172 }
174 } 173 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/dart2js.dart ('k') | tests/standalone/io/skipping_dart2js_compilations_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698