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

Unified Diff: sdk/lib/_internal/compiler/implementation/source_file_provider.dart

Issue 13797002: Change MirrorSystem.libraries to Map<Uri, String> (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: sdk/lib/_internal/compiler/implementation/source_file_provider.dart
diff --git a/sdk/lib/_internal/compiler/implementation/source_file_provider.dart b/sdk/lib/_internal/compiler/implementation/source_file_provider.dart
index 4157fc9e45175efcba141395e9aa0afd88c51f39..609cf1c2230dc9ccec01ab4eb23257e6911dbb4b 100644
--- a/sdk/lib/_internal/compiler/implementation/source_file_provider.dart
+++ b/sdk/lib/_internal/compiler/implementation/source_file_provider.dart
@@ -27,7 +27,6 @@ String readAll(String filename) {
class SourceFileProvider {
bool isWindows = (Platform.operatingSystem == 'windows');
- Uri cwd = getCurrentDirectory();
ahe 2013/04/09 08:28:44 I think it makes sense to keep the local variable.
Johnni Winther 2013/04/22 13:00:02 Done.
Map<String, SourceFile> sourceFiles = <String, SourceFile>{};
int dartCharactersRead = 0;
@@ -39,12 +38,13 @@ class SourceFileProvider {
try {
source = readAll(uriPathToNative(resourceUri.path));
} on FileIOException catch (ex) {
- throw 'Error: Cannot read "${relativize(cwd, resourceUri, isWindows)}" '
+ throw 'Error: Cannot read '
+ '"${relativize(currentDirectory, resourceUri, isWindows)}" '
'(${ex.osError}).';
}
dartCharactersRead += source.length;
- sourceFiles[resourceUri.toString()] =
- new SourceFile(relativize(cwd, resourceUri, isWindows), source);
+ sourceFiles[resourceUri.toString()] = new SourceFile(
+ relativize(currentDirectory, resourceUri, isWindows), source);
return new Future.immediate(source);
}
}

Powered by Google App Engine
This is Rietveld 408576698