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

Issue 8993011: Don't allow elements of a DartBinaryExpression to be null. (Closed)

Created:
9 years ago by codefu
Modified:
9 years ago
Reviewers:
mmendez, danrubel
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Don't allow elements of a DartBinaryExpression to be null. Issue: http://code.google.com/p/dart/issues/detail?id=832 Note; I'm still getting NPEs, but the corelibrary isn't being found (a different issue between Editor/DartC usage?). R=danrubel@google.com,mmendez@google.com Committed: https://code.google.com/p/dart/source/detail?r=2600

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+2 lines, -2 lines) Patch
M compiler/java/com/google/dart/compiler/ast/DartBinaryExpression.java View 1 chunk +2 lines, -2 lines 2 comments Download

Messages

Total messages: 4 (0 generated)
codefu
9 years ago (2011-12-19 18:22:42 UTC) #1
mmendez
LGTM What would a user see in the editor when this error occurs? Will the ...
9 years ago (2011-12-19 20:01:37 UTC) #2
danrubel
lgtm
9 years ago (2011-12-19 20:58:34 UTC) #3
codefu
9 years ago (2011-12-19 23:24:18 UTC) #4
The error has a warning in the editor about "X" is undefined, and a slew of
other errors later that wont make sense because the AST is still a bit wonky.

http://codereview.chromium.org/8993011/diff/1/compiler/java/com/google/dart/c...
File compiler/java/com/google/dart/compiler/ast/DartBinaryExpression.java
(right):

http://codereview.chromium.org/8993011/diff/1/compiler/java/com/google/dart/c...
compiler/java/com/google/dart/compiler/ast/DartBinaryExpression.java:25:
this.arg1 = becomeParentOf(arg1 != null ? arg1 : new
DartSyntheticErrorExpression());
On 2011/12/19 20:01:37, mmendez wrote:
> Nit: should you be passing the token string to the
DartSyntheticErrorExpression
> constructor.

There is no tokenString in this case as the argument is null.  Two of the other
3 pass either an empty string or a null; all three deal with string
interpolation.  I can update it to pass an empty string.

Powered by Google App Engine
This is Rietveld 408576698