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

Unified Diff: compiler/java/com/google/dart/compiler/UrlSource.java

Issue 9702034: Removes dartc reliance on its own libraries, now can be targeted at any implementation's libraries (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: junit tests fixed Created 8 years, 9 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: compiler/java/com/google/dart/compiler/UrlSource.java
diff --git a/compiler/java/com/google/dart/compiler/UrlSource.java b/compiler/java/com/google/dart/compiler/UrlSource.java
index b5f805d5720ef26a7063cf272568badd18553e02..b71ed09a908af3ab0cb91ae5d437fcf58a435ff8 100644
--- a/compiler/java/com/google/dart/compiler/UrlSource.java
+++ b/compiler/java/com/google/dart/compiler/UrlSource.java
@@ -31,6 +31,9 @@ public abstract class UrlSource implements Source {
private final URI uri;
private final URI absoluteUri;
+ /**
+ * original URI translated into a file: URI
+ */
private final URI translatedUri;
private final boolean shouldCareAboutLastModified;
private volatile boolean exists = false;
@@ -68,6 +71,7 @@ public abstract class UrlSource implements Source {
protected UrlSource(File file) {
URI uri = file.toURI().normalize();
+
if (!file.exists()) {
// TODO(jgw): This is a bit ugly, but some of the test infrastructure depends upon
// non-existant relative files being looked up as classpath resources. This was
@@ -79,7 +83,10 @@ public abstract class UrlSource implements Source {
}
this.uri = BASE_URI.relativize(uri);
- this.translatedUri = this.absoluteUri = BASE_URI.resolve(uri);
+ this.translatedUri = this.absoluteUri = BASE_URI.resolve(uri);
+
+
+
this.systemLibraryManager = null;
this.shouldCareAboutLastModified = true;
}

Powered by Google App Engine
This is Rietveld 408576698