| 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 @patch | 5 @patch class _AsyncRun { |
| 6 class _AsyncRun { | 6 @patch static void _scheduleImmediate(void callback()) { |
| 7 @patch | |
| 8 static void _scheduleImmediate(void callback()) { | |
| 9 if (_ScheduleImmediate._closure == null) { | 7 if (_ScheduleImmediate._closure == null) { |
| 10 throw new UnsupportedError("Microtasks are not supported"); | 8 throw new UnsupportedError("Microtasks are not supported"); |
| 11 } | 9 } |
| 12 _ScheduleImmediate._closure(callback); | 10 _ScheduleImmediate._closure(callback); |
| 13 } | 11 } |
| 14 } | 12 } |
| 15 | 13 |
| 16 typedef void _ScheduleImmediateClosure(void callback()); | 14 typedef void _ScheduleImmediateClosure(void callback()); |
| 17 | 15 |
| 18 class _ScheduleImmediate { | 16 class _ScheduleImmediate { |
| 19 static _ScheduleImmediateClosure _closure; | 17 static _ScheduleImmediateClosure _closure; |
| 20 } | 18 } |
| 21 | 19 |
| 22 void _setScheduleImmediateClosure(_ScheduleImmediateClosure closure) { | 20 void _setScheduleImmediateClosure(_ScheduleImmediateClosure closure) { |
| 23 _ScheduleImmediate._closure = closure; | 21 _ScheduleImmediate._closure = closure; |
| 24 } | 22 } |
| OLD | NEW |