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

Issue 1464173002: Play it safe with null tokens/nodes (#24910). (Closed)

Created:
5 years, 1 month ago by pquitslund
Modified:
5 years, 1 month ago
Reviewers:
scheglov
CC:
reviews_dartlang.org
Base URL:
https://github.com/dart-lang/linter.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Play it safe with null tokens/nodes (#24910). Background here: https://github.com/dart-lang/sdk/issues/24910 The rub is we need to be careful in case nodes or tokens are null (for example when analyzing invalid source). BUG=24910 R=scheglov@google.com Committed: https://github.com/dart-lang/linter/commit/4640d54ce6df882392a75b7e90ee6a04e278f393

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+6 lines, -2 lines) Patch
M lib/src/linter.dart View 1 chunk +6 lines, -2 lines 0 comments Download

Messages

Total messages: 6 (1 generated)
pquitslund
5 years, 1 month ago (2015-11-22 03:30:52 UTC) #2
scheglov
LGTM At some point it would be nice to write a test that exposes the ...
5 years, 1 month ago (2015-11-22 03:32:49 UTC) #3
pquitslund
On 2015/11/22 03:32:49, scheglov wrote: > LGTM Thanks! > At some point it would be ...
5 years, 1 month ago (2015-11-22 03:42:26 UTC) #4
pquitslund
Committed patchset #1 (id:1) manually as 4640d54ce6df882392a75b7e90ee6a04e278f393 (presubmit successful).
5 years, 1 month ago (2015-11-22 03:43:41 UTC) #5
scheglov
5 years, 1 month ago (2015-11-22 03:46:22 UTC) #6
Message was sent while issue was closed.
On 2015/11/22 03:42:26, pquitslund wrote:
> On 2015/11/22 03:32:49, scheglov wrote:
> > LGTM
> 
> Thanks!
> 
> > At some point it would be nice to write a test that exposes the NPE you're
> > fixing now.
> > But not today :-)
> 
> Agreed!  I was thinking about this.  Some tests with invalid source would be
> great.  Do you do any similar guarding in analyzer?  Any tests over invalid
> source?

Sometimes.
See usages of the AbstractSingleUnitTest.verifyNoTestUnitErrors field.

Powered by Google App Engine
This is Rietveld 408576698