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:isolate library. | 5 // Patch file for the dart:isolate library. |
6 | 6 |
7 #import("dart:uri"); | 7 import 'dart:uri'; |
8 | 8 |
9 /** | 9 /** |
10 * Called by the compiler to support switching | 10 * Called by the compiler to support switching |
11 * between isolates when we get a callback from the DOM. | 11 * between isolates when we get a callback from the DOM. |
12 */ | 12 */ |
13 void _callInIsolate(_IsolateContext isolate, Function function) { | 13 void _callInIsolate(_IsolateContext isolate, Function function) { |
14 isolate.eval(function); | 14 isolate.eval(function); |
15 _globalState.topEventLoop.run(); | 15 _globalState.topEventLoop.run(); |
16 } | 16 } |
17 | 17 |
(...skipping 1262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1280 _window.clearTimeout(_handle); | 1280 _window.clearTimeout(_handle); |
1281 } else { | 1281 } else { |
1282 _window.clearInterval(_handle); | 1282 _window.clearInterval(_handle); |
1283 } | 1283 } |
1284 } | 1284 } |
1285 } | 1285 } |
1286 | 1286 |
1287 Timer _timerFactory(int millis, void callback(Timer timer), bool repeating) => | 1287 Timer _timerFactory(int millis, void callback(Timer timer), bool repeating) => |
1288 repeating ? new _Timer.repeating(millis, callback) | 1288 repeating ? new _Timer.repeating(millis, callback) |
1289 : new _Timer(millis, callback); | 1289 : new _Timer(millis, callback); |
OLD | NEW |