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

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

Issue 10702054: Issue 3931. Visit children nodes safely. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 6 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/DartNamedExpression.java
diff --git a/compiler/java/com/google/dart/compiler/ast/DartNamedExpression.java b/compiler/java/com/google/dart/compiler/ast/DartNamedExpression.java
index 2a9416b59e8ce32c31589a90a3323eaa984025ab..218d0957cb66278dee34fa9e0caafbe608780266 100644
--- a/compiler/java/com/google/dart/compiler/ast/DartNamedExpression.java
+++ b/compiler/java/com/google/dart/compiler/ast/DartNamedExpression.java
@@ -27,12 +27,8 @@ public class DartNamedExpression extends DartExpression {
@Override
public void visitChildren(ASTVisitor<?> visitor) {
- if (name != null) {
- name.accept(visitor);
- }
- if (expression != null) {
- expression.accept(visitor);
- }
+ safelyVisitChild(name, visitor);
+ safelyVisitChild(expression, visitor);
}
@Override

Powered by Google App Engine
This is Rietveld 408576698