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

Issue 598993002: Add missing null-tests to async error functions. (Closed)

Created:
6 years, 3 months ago by Lasse Reichstein Nielsen
Modified:
6 years, 2 months ago
Reviewers:
Søren Gjesse, floitsch
CC:
reviews_dartlang.org, floitsch
Visibility:
Public.

Description

Add missing null-tests to async error functions. Also treat null errors comming out of Zone.errorCallback as NullThrownError. This should prevent, as was always the intention, any async error from having a null value. This is important for async/await syntax, where the distinction between sync and async errors is removed. (For Dart 2.0, we could just make null throwable). R=sgjesse@google.com Committed: https://code.google.com/p/dart/source/detail?r=40673

Patch Set 1 #

Total comments: 8

Patch Set 2 : Switched to async NullThrownErrors. #

Patch Set 3 : Update test expecting null error to throw #

Patch Set 4 : co19 expectation changed - not throwing on null error. #

Patch Set 5 : Add co19 issue number to status file. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+43 lines, -24 lines) Patch
M sdk/lib/async/broadcast_stream_controller.dart View 1 1 chunk +2 lines, -1 line 0 comments Download
M sdk/lib/async/future.dart View 1 2 chunks +12 lines, -6 lines 0 comments Download
M sdk/lib/async/future_impl.dart View 1 2 chunks +2 lines, -3 lines 0 comments Download
M sdk/lib/async/stream.dart View 1 1 chunk +1 line, -1 line 0 comments Download
M sdk/lib/async/stream_controller.dart View 1 2 chunks +4 lines, -1 line 0 comments Download
M sdk/lib/async/stream_pipe.dart View 1 3 chunks +8 lines, -6 lines 0 comments Download
M sdk/lib/async/zone.dart View 1 2 chunks +4 lines, -3 lines 0 comments Download
M tests/co19/co19-co19.status View 1 2 3 4 2 chunks +3 lines, -1 line 0 comments Download
M tests/lib/async/future_test.dart View 1 2 1 chunk +6 lines, -1 line 0 comments Download
M tests/lib/async/stream_controller_async_test.dart View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 7 (2 generated)
Lasse Reichstein Nielsen
6 years, 3 months ago (2014-09-24 12:28:40 UTC) #2
floitsch
DBC. https://codereview.chromium.org/598993002/diff/1/sdk/lib/async/broadcast_stream_controller.dart File sdk/lib/async/broadcast_stream_controller.dart (right): https://codereview.chromium.org/598993002/diff/1/sdk/lib/async/broadcast_stream_controller.dart#newcode241 sdk/lib/async/broadcast_stream_controller.dart:241: if (error == null) throw new ArgumentError("Error must ...
6 years, 3 months ago (2014-09-24 12:59:14 UTC) #4
Søren Gjesse
lgtm, As we can't totally avoid nulls Florians suggestion might be the right thing to ...
6 years, 3 months ago (2014-09-24 13:29:31 UTC) #5
Lasse Reichstein Nielsen
https://codereview.chromium.org/598993002/diff/1/sdk/lib/async/broadcast_stream_controller.dart File sdk/lib/async/broadcast_stream_controller.dart (right): https://codereview.chromium.org/598993002/diff/1/sdk/lib/async/broadcast_stream_controller.dart#newcode241 sdk/lib/async/broadcast_stream_controller.dart:241: if (error == null) throw new ArgumentError("Error must not ...
6 years, 3 months ago (2014-09-24 13:49:58 UTC) #6
Lasse Reichstein Nielsen
6 years, 2 months ago (2014-09-25 11:01:00 UTC) #7
Message was sent while issue was closed.
Committed patchset #5 (id:80001) manually as 40673 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698