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

Issue 2718643003: fix future onError handler wrapping to avoid cast error (Closed)

Created:
3 years, 10 months ago by Jennifer Messerly
Modified:
3 years, 9 months ago
CC:
reviews_dartlang.org, vsm
Target Ref:
refs/heads/master
Visibility:
Public.

Description

fix future onError handler wrapping to avoid cast error the return type was invalid, which caused a runtime cast failure. Many of the onError handlers return `void` which is not assignable to T. This was discovered in internal testing as we attempted to run DDC against the unforked SDK sources. R=floitsch@google.com Committed: https://github.com/dart-lang/sdk/commit/18c4f5cf08e43366635f1be97532a9033247f5dc

Patch Set 1 #

Total comments: 3

Patch Set 2 : take 2 #

Total comments: 2

Patch Set 3 : add todo #

Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -2 lines) Patch
M sdk/lib/async/future.dart View 1 2 1 chunk +3 lines, -1 line 0 comments Download
M sdk/lib/async/future_impl.dart View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 13 (3 generated)
Jennifer Messerly
Hi Lasse, could you take a look? Thanks to Vijay for helping me track this ...
3 years, 10 months ago (2017-02-24 20:16:59 UTC) #3
Jennifer Messerly
this is related to this bug: https://github.com/dart-lang/sdk/issues/27314, about unforking DDC's SDK.
3 years, 10 months ago (2017-02-24 20:18:40 UTC) #4
floitsch
With the exception of the mistake in future_impl.dart:240 the types here are correct. The result ...
3 years, 9 months ago (2017-02-27 13:19:04 UTC) #5
Jennifer Messerly
thanks! https://codereview.chromium.org/2718643003/diff/1/sdk/lib/async/future_impl.dart File sdk/lib/async/future_impl.dart (left): https://codereview.chromium.org/2718643003/diff/1/sdk/lib/async/future_impl.dart#oldcode240 sdk/lib/async/future_impl.dart:240: onError = _registerErrorHandler<T>(onError, currentZone); On 2017/02/27 13:19:04, floitsch ...
3 years, 9 months ago (2017-02-27 18:41:02 UTC) #6
floitsch
https://codereview.chromium.org/2718643003/diff/1/sdk/lib/async/future_impl.dart File sdk/lib/async/future_impl.dart (left): https://codereview.chromium.org/2718643003/diff/1/sdk/lib/async/future_impl.dart#oldcode240 sdk/lib/async/future_impl.dart:240: onError = _registerErrorHandler<T>(onError, currentZone); On 2017/02/27 18:41:02, Jennifer Messerly ...
3 years, 9 months ago (2017-02-27 19:02:39 UTC) #7
Jennifer Messerly
here's the alternate fix.
3 years, 9 months ago (2017-02-28 18:50:00 UTC) #8
floitsch
Thanks! LGTM. https://codereview.chromium.org/2718643003/diff/20001/sdk/lib/async/future.dart File sdk/lib/async/future.dart (right): https://codereview.chromium.org/2718643003/diff/20001/sdk/lib/async/future.dart#newcode307 sdk/lib/async/future.dart:307: handleError(theError, theStackTrace) { This looks like a ...
3 years, 9 months ago (2017-02-28 19:04:35 UTC) #9
Jennifer Messerly
thank you! https://codereview.chromium.org/2718643003/diff/20001/sdk/lib/async/future.dart File sdk/lib/async/future.dart (right): https://codereview.chromium.org/2718643003/diff/20001/sdk/lib/async/future.dart#newcode307 sdk/lib/async/future.dart:307: handleError(theError, theStackTrace) { On 2017/02/28 19:04:35, floitsch ...
3 years, 9 months ago (2017-02-28 19:23:31 UTC) #10
Jennifer Messerly
Committed patchset #3 (id:40001) manually as 18c4f5cf08e43366635f1be97532a9033247f5dc (presubmit successful).
3 years, 9 months ago (2017-02-28 22:59:57 UTC) #12
floitsch
3 years, 9 months ago (2017-03-01 08:52:16 UTC) #13
Message was sent while issue was closed.
TODO LGTM.
thanks again.

Powered by Google App Engine
This is Rietveld 408576698