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

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

Issue 9921015: Visit name of DartDeclaration, set Element for DartIdentifier (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Visit more name-like nodes, tweaks for review 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
« no previous file with comments | « no previous file | compiler/java/com/google/dart/compiler/ast/DartClass.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: compiler/java/com/google/dart/compiler/LibraryDepsVisitor.java
diff --git a/compiler/java/com/google/dart/compiler/LibraryDepsVisitor.java b/compiler/java/com/google/dart/compiler/LibraryDepsVisitor.java
index 4b68df49a3838f4e8e878255f3b2f6986be430ac..31237321dc929b903abd55234b92e85b854f5fa9 100644
--- a/compiler/java/com/google/dart/compiler/LibraryDepsVisitor.java
+++ b/compiler/java/com/google/dart/compiler/LibraryDepsVisitor.java
@@ -133,12 +133,13 @@ public class LibraryDepsVisitor extends ASTVisitor<Void> {
private void addElementDependency(Element element) {
DartSource elementSource = (DartSource) element.getSourceInfo().getSource();
if (elementSource != null) {
- URI libUri = elementSource.getLibrary().getUri();
- LibraryDeps.Dependency dep =
- new LibraryDeps.Dependency(libUri,
- elementSource.getName(),
- elementSource.getLastModified());
- source.addDep(dep);
+ LibrarySource library = elementSource.getLibrary();
+ if (library != null) {
+ URI libUri = library.getUri();
+ LibraryDeps.Dependency dep = new LibraryDeps.Dependency(libUri, elementSource.getName(),
+ elementSource.getLastModified());
+ source.addDep(dep);
+ }
}
}
}
« no previous file with comments | « no previous file | compiler/java/com/google/dart/compiler/ast/DartClass.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698