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

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

Issue 2878553003: Use Null argument for callback arity check in async_error (Closed)
Patch Set: Created 3 years, 7 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 | no next file » | 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 e575b4152c3b4ba9c29d926937c06c9b32bfc8a2..53002dce021efb0f6affa71427038229614f06dc 100644
--- a/sdk/lib/async/async_error.dart
+++ b/sdk/lib/async/async_error.dart
@@ -6,8 +6,8 @@ part of dart.async;
_invokeErrorHandler(
Function errorHandler, Object error, StackTrace stackTrace) {
- if (errorHandler is ZoneBinaryCallback) {
- return errorHandler(error, stackTrace);
+ if (errorHandler is ZoneBinaryCallback<dynamic, Null, Null>) {
+ return (errorHandler as dynamic)(error, stackTrace);
} else {
ZoneUnaryCallback unaryErrorHandler = errorHandler;
return unaryErrorHandler(error);
@@ -15,7 +15,7 @@ _invokeErrorHandler(
}
Function _registerErrorHandler<R>(Function errorHandler, Zone zone) {
- if (errorHandler is ZoneBinaryCallback) {
+ if (errorHandler is ZoneBinaryCallback<dynamic, Null, Null>) {
return zone.registerBinaryCallback<R, Object, StackTrace>(
errorHandler as dynamic/*=ZoneBinaryCallback<R, Object, StackTrace>*/);
} else {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698