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

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

Issue 8572026: Handle NPE case for 'dart:typo' (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years, 1 month 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 67987f4f10cb60b513b745a5d75d855ef5ee0cf6..6411b0512bd4e9e962d7efe5c23f947d6b07986e 100644
--- a/compiler/java/com/google/dart/compiler/UrlSource.java
+++ b/compiler/java/com/google/dart/compiler/UrlSource.java
@@ -49,6 +49,10 @@ public abstract class UrlSource implements Source {
protected UrlSource(URI uri, SystemLibraryManager slm) {
URI expanded = slm != null ? slm.expandRelativeDartUri(uri) : uri;
+ if (expanded == null) {
+ // import("dart:typo") case
+ expanded = uri;
+ }
this.uri = BASE_URI.relativize(expanded.normalize());
this.absoluteUri = BASE_URI.resolve(expanded);
this.systemLibraryManager = slm;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698