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

Unified Diff: sdk/lib/async/future_impl.dart

Issue 2718643003: fix future onError handler wrapping to avoid cast error (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sdk/lib/async/async_error.dart ('k') | sdk/lib/async/stream_impl.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/async/future_impl.dart
diff --git a/sdk/lib/async/future_impl.dart b/sdk/lib/async/future_impl.dart
index eaad3b48c2e8d97ef1691845eeb8fecb26a1d3cb..0fd18eae6a97af2ae3f8513007455d4d6db04c7e 100644
--- a/sdk/lib/async/future_impl.dart
+++ b/sdk/lib/async/future_impl.dart
@@ -237,7 +237,7 @@ class _Future<T> implements Future<T> {
if (!identical(currentZone, _ROOT_ZONE)) {
f = currentZone.registerUnaryCallback<FutureOr<E>, T>(f);
if (onError != null) {
- onError = _registerErrorHandler<T>(onError, currentZone);
floitsch 2017/02/27 13:19:04 This was a mistake. It should have been `_register
Jennifer Messerly 2017/02/27 18:41:02 okay. I can fix it that way, however: at least a c
floitsch 2017/02/27 19:02:39 I will have a look tomorrow. If you have these pla
+ onError = _registerErrorHandler(onError, currentZone);
}
}
return _thenNoZoneRegistration<E>(f, onError);
@@ -253,7 +253,7 @@ class _Future<T> implements Future<T> {
Future<T> catchError(Function onError, { bool test(error) }) {
_Future<T> result = new _Future<T>();
if (!identical(result._zone, _ROOT_ZONE)) {
- onError = _registerErrorHandler<T>(onError, result._zone);
+ onError = _registerErrorHandler(onError, result._zone);
if (test != null) test = result._zone.registerUnaryCallback(test);
}
_addListener(new _FutureListener<T, T>.catchError(
« no previous file with comments | « sdk/lib/async/async_error.dart ('k') | sdk/lib/async/stream_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698