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

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

Issue 2762953003: More minor type improvements in dart:async. (Closed)
Patch Set: More fixes. Created 3 years, 9 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 | « no previous file | sdk/lib/async/broadcast_stream_controller.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/async/async_error.dart
diff --git a/sdk/lib/async/async_error.dart b/sdk/lib/async/async_error.dart
index cfb2beeab7d4ecdde4a0ab2edf2c8da746f0df81..e575b4152c3b4ba9c29d926937c06c9b32bfc8a2 100644
--- a/sdk/lib/async/async_error.dart
+++ b/sdk/lib/async/async_error.dart
@@ -16,32 +16,10 @@ _invokeErrorHandler(
Function _registerErrorHandler<R>(Function errorHandler, Zone zone) {
if (errorHandler is ZoneBinaryCallback) {
- return zone.registerBinaryCallback<R, dynamic, StackTrace>(
- errorHandler as dynamic/*=ZoneBinaryCallback<R, dynamic, StackTrace>*/);
+ return zone.registerBinaryCallback<R, Object, StackTrace>(
+ errorHandler as dynamic/*=ZoneBinaryCallback<R, Object, StackTrace>*/);
} else {
- return zone.registerUnaryCallback<R, dynamic>(
- errorHandler as dynamic/*=ZoneUnaryCallback<R, dynamic>*/);
- }
-}
-
-class _UncaughtAsyncError extends AsyncError {
- _UncaughtAsyncError(error, StackTrace stackTrace)
- : super(error, _getBestStackTrace(error, stackTrace));
-
- static StackTrace _getBestStackTrace(error, StackTrace stackTrace) {
- if (stackTrace != null) return stackTrace;
- if (error is Error) {
- return error.stackTrace;
- }
- return null;
- }
-
- String toString() {
- String result = "Uncaught Error: ${error}";
-
- if (stackTrace != null) {
- result += "\nStack Trace:\n$stackTrace";
- }
- return result;
+ return zone.registerUnaryCallback<R, Object>(
+ errorHandler as dynamic/*=ZoneUnaryCallback<R, Object>*/);
}
}
« no previous file with comments | « no previous file | sdk/lib/async/broadcast_stream_controller.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698