| Index: runtime/lib/timer_patch.dart
|
| diff --git a/runtime/lib/timer_patch.dart b/runtime/lib/timer_patch.dart
|
| index 249a81afb7f2b19eec59a6756931e066b2523112..e5f7b06e624acfbdd37578135dd7e7bb968689c2 100644
|
| --- a/runtime/lib/timer_patch.dart
|
| +++ b/runtime/lib/timer_patch.dart
|
| @@ -4,8 +4,10 @@
|
|
|
| import 'dart:_internal' hide Symbol;
|
|
|
| -@patch class Timer {
|
| - @patch static Timer _createTimer(Duration duration, void callback()) {
|
| +@patch
|
| +class Timer {
|
| + @patch
|
| + static Timer _createTimer(Duration duration, void callback()) {
|
| // TODO(iposva): Remove _TimerFactory and use VMLibraryHooks exclusively.
|
| if (_TimerFactory._factory == null) {
|
| _TimerFactory._factory = VMLibraryHooks.timerFactory;
|
| @@ -15,11 +17,14 @@ import 'dart:_internal' hide Symbol;
|
| }
|
| int milliseconds = duration.inMilliseconds;
|
| if (milliseconds < 0) milliseconds = 0;
|
| - return _TimerFactory._factory(milliseconds, (_) { callback(); }, false);
|
| + return _TimerFactory._factory(milliseconds, (_) {
|
| + callback();
|
| + }, false);
|
| }
|
|
|
| - @patch static Timer _createPeriodicTimer(Duration duration,
|
| - void callback(Timer timer)) {
|
| + @patch
|
| + static Timer _createPeriodicTimer(
|
| + Duration duration, void callback(Timer timer)) {
|
| // TODO(iposva): Remove _TimerFactory and use VMLibraryHooks exclusively.
|
| if (_TimerFactory._factory == null) {
|
| _TimerFactory._factory = VMLibraryHooks.timerFactory;
|
| @@ -33,9 +38,8 @@ import 'dart:_internal' hide Symbol;
|
| }
|
| }
|
|
|
| -typedef Timer _TimerFactoryClosure(int milliseconds,
|
| - void callback(Timer timer),
|
| - bool repeating);
|
| +typedef Timer _TimerFactoryClosure(
|
| + int milliseconds, void callback(Timer timer), bool repeating);
|
|
|
| // Warning: Dartium sets _TimerFactory._factory instead of setting things up
|
| // through VMLibraryHooks.timerFactory.
|
|
|