| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 part of dart.async; | 5 part of dart.async; |
| 6 | 6 |
| 7 typedef void _AsyncCallback(); | 7 typedef void _AsyncCallback(); |
| 8 | 8 |
| 9 class _AsyncCallbackEntry { | 9 class _AsyncCallbackEntry { |
| 10 final _AsyncCallback callback; | 10 final _AsyncCallback callback; |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 // No need to bind the callback. We know that the root's scheduleMicrotask | 128 // No need to bind the callback. We know that the root's scheduleMicrotask |
| 129 // will be invoked in the root zone. | 129 // will be invoked in the root zone. |
| 130 _rootScheduleMicrotask(null, null, _ROOT_ZONE, callback); | 130 _rootScheduleMicrotask(null, null, _ROOT_ZONE, callback); |
| 131 return; | 131 return; |
| 132 } | 132 } |
| 133 Zone.current.scheduleMicrotask( | 133 Zone.current.scheduleMicrotask( |
| 134 Zone.current.bindCallback(callback, runGuarded: true)); | 134 Zone.current.bindCallback(callback, runGuarded: true)); |
| 135 } | 135 } |
| 136 | 136 |
| 137 class _AsyncRun { | 137 class _AsyncRun { |
| 138 @patch | 138 /** Schedule the given callback before any other event in the event-loop. */ |
| 139 static void _scheduleImmediate(void callback()) { | 139 static void _scheduleImmediate(void callback()) { |
| 140 scheduleImmediateClosure(callback); | 140 scheduleImmediateClosure(callback); |
| 141 } | 141 } |
| 142 } | 142 } |
| OLD | NEW |