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

Issue 2857143003: dart2js_html: Fix for issue 29538 - some returned lists may be null (Closed)

Created:
3 years, 7 months ago by sra1
Modified:
3 years, 7 months ago
CC:
reviews_dartlang.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

dart2js_html: Fix for issue 29538 - some returned lists may be null Annotate querySelectorAll as not-null to recover code quality. R=sigmund@google.com Committed: https://github.com/dart-lang/sdk/commit/ea2c9cba39a4350e0f0b0e960ed08c80e0a998a3

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+61 lines, -47 lines) Patch
M sdk/lib/html/dart2js/html_dart2js.dart View 40 chunks +41 lines, -41 lines 0 comments Download
M sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart View 3 chunks +3 lines, -3 lines 0 comments Download
M sdk/lib/svg/dart2js/svg_dart2js.dart View 1 chunk +2 lines, -2 lines 0 comments Download
M tools/dom/scripts/dartmetadata.py View 1 chunk +14 lines, -0 lines 0 comments Download
M tools/dom/scripts/systemhtml.py View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 8 (4 generated)
Siggi Cherem (dart-lang)
lgtm
3 years, 7 months ago (2017-05-03 21:22:38 UTC) #3
sra1
Committed patchset #1 (id:20001) manually as ea2c9cba39a4350e0f0b0e960ed08c80e0a998a3 (presubmit successful).
3 years, 7 months ago (2017-05-03 21:26:50 UTC) #5
Alan Knight
So this is making it the default for things to be able to return null. ...
3 years, 7 months ago (2017-05-04 17:52:30 UTC) #7
sra1
3 years, 7 months ago (2017-05-04 18:17:37 UTC) #8
Message was sent while issue was closed.
On 2017/05/04 17:52:30, Alan Knight wrote:
> So this is making it the default for things to be able to return null. Or how
> often does the condition that native_type is not the same as return_type?  But
> if it works for you folks, I guess that's fine.

All lists fall into this bucket. The interface is e.g. List<Node>, the concrete
type is NodeList.
There are 43 changes, so it happens 43 times.
We have had several bugs because something could be null but the annotation lied
and dart2js optimized `x==null` to `false`.
We should opt-in to non-nullablilty via the metadata table only when we are
certain.

Powered by Google App Engine
This is Rietveld 408576698