OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 file for the dart:async library. | 5 // Patch file for the dart:async library. |
6 | 6 |
7 import 'dart:_js_helper' show | 7 import 'dart:_js_helper' show |
8 Primitives, | 8 Primitives, |
9 convertDartClosureToJS, | 9 convertDartClosureToJS, |
10 loadDeferredLibrary; | 10 loadDeferredLibrary; |
(...skipping 15 matching lines...) Expand all Loading... |
26 } | 26 } |
27 | 27 |
28 patch class _AsyncRun { | 28 patch class _AsyncRun { |
29 patch static void _scheduleImmediate(void callback()) { | 29 patch static void _scheduleImmediate(void callback()) { |
30 // TODO(9002): don't use the Timer to enqueue the immediate callback. | 30 // TODO(9002): don't use the Timer to enqueue the immediate callback. |
31 _createTimer(Duration.ZERO, callback); | 31 _createTimer(Duration.ZERO, callback); |
32 } | 32 } |
33 } | 33 } |
34 | 34 |
35 patch class DeferredLibrary { | 35 patch class DeferredLibrary { |
36 patch Future<bool> load() { | 36 patch Future<Null> load() { |
37 return loadDeferredLibrary(libraryName, uri); | 37 return loadDeferredLibrary(libraryName, uri); |
38 } | 38 } |
39 } | 39 } |
40 | 40 |
41 bool get _hasDocument => JS('String', 'typeof document') == 'object'; | 41 bool get _hasDocument => JS('String', 'typeof document') == 'object'; |
OLD | NEW |