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

Unified Diff: compiler/java/com/google/dart/compiler/ast/DartUnit.java

Issue 8229028: Don't allow a #source directive in a library unit include itself (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Minor cleanup from previous, removed some debugging code Created 9 years, 2 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/ast/DartUnit.java
diff --git a/compiler/java/com/google/dart/compiler/ast/DartUnit.java b/compiler/java/com/google/dart/compiler/ast/DartUnit.java
index faa2982e1fc27c93ce67e78a998c68341718df51..ff55c06358bcd8c5fcbc9afb75d47be688b35d7f 100644
--- a/compiler/java/com/google/dart/compiler/ast/DartUnit.java
+++ b/compiler/java/com/google/dart/compiler/ast/DartUnit.java
@@ -147,6 +147,9 @@ public class DartUnit extends DartNode {
* Answer the receiver's directives or <code>null</code> if none
*/
public List<DartDirective> getDirectives() {
+ if (directives == null) {
+ return Collections.<DartDirective> emptyList();
+ }
return directives;
}
-}
+}

Powered by Google App Engine
This is Rietveld 408576698