Index: sdk/lib/async/timer.dart |
diff --git a/sdk/lib/async/timer.dart b/sdk/lib/async/timer.dart |
index 97f68983e31bb2bdcfbfa9afe50cb647f5b18464..5e103dc689dadcb30119be9d79c42872e5119fec 100644 |
--- a/sdk/lib/async/timer.dart |
+++ b/sdk/lib/async/timer.dart |
@@ -48,8 +48,8 @@ abstract class Timer { |
// be invoked in the root zone. |
return Zone.current.createTimer(duration, callback); |
} |
- return Zone.current.createTimer( |
- duration, Zone.current.bindCallback(callback, runGuarded: true)); |
+ return Zone.current |
+ .createTimer(duration, Zone.current.bindCallbackGuarded(callback)); |
} |
/** |
@@ -74,10 +74,7 @@ abstract class Timer { |
// be invoked in the root zone. |
return Zone.current.createPeriodicTimer(duration, callback); |
} |
- // TODO(floitsch): the return type should be 'void', and the type |
- // should be inferred. |
- var boundCallback = Zone.current |
- .bindUnaryCallback<dynamic, Timer>(callback, runGuarded: true); |
+ var boundCallback = Zone.current.bindUnaryCallbackGuarded<Timer>(callback); |
return Zone.current.createPeriodicTimer(duration, boundCallback); |
} |