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

Issue 8895029: Guard against NPE in: http://code.google.com/p/dart/issues/detail?id=815. (Closed)

Created:
9 years ago by mmendez
Modified:
9 years ago
Reviewers:
Brian Wilkerson
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+19 lines, -17 lines) Patch
M compiler/java/com/google/dart/compiler/DartCompiler.java View 2 chunks +19 lines, -17 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
mmendez
I went ahead and added a guard for you. However, it seems likely that DartCompiler, ...
9 years ago (2011-12-13 21:42:18 UTC) #1
Brian Wilkerson
LGTM. I'm not sure how else libraryUnit would get to be null, or where else ...
9 years ago (2011-12-13 22:18:45 UTC) #2
mmendez
9 years ago (2011-12-14 14:29:02 UTC) #3
I'll go ahead and commit it since, internally
DartCompilerMainContext.getLibraryUnit can return null if an IOError is thrown
during the parsing of the file.

DartCompilerMainContext does raise an onError event in this case.  It would be
good to double check that the editor receives and logs this error.

On 2011/12/13 22:18:45, Brian Wilkerson wrote:
> LGTM.
> 
> I'm not sure how else libraryUnit would get to be null, or where else the NPE
> could be coming from, but if you don't think that it's null here then let's
not
> commit this and let's add some code to help track down the real cause.

Powered by Google App Engine
This is Rietveld 408576698