| 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 |
| (...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 String message; | 357 String message; |
| 358 | 358 |
| 359 _IsolateEvent(this.isolate, this.fn, this.message); | 359 _IsolateEvent(this.isolate, this.fn, this.message); |
| 360 | 360 |
| 361 void process() { | 361 void process() { |
| 362 isolate.eval(fn); | 362 isolate.eval(fn); |
| 363 } | 363 } |
| 364 } | 364 } |
| 365 | 365 |
| 366 /** An interface for a stub used to interact with a manager. */ | 366 /** An interface for a stub used to interact with a manager. */ |
| 367 interface _ManagerStub { | 367 abstract class _ManagerStub { |
| 368 get id; | 368 get id; |
| 369 void set id(int i); | 369 void set id(int i); |
| 370 void set onmessage(Function f); | 370 void set onmessage(Function f); |
| 371 void postMessage(msg); | 371 void postMessage(msg); |
| 372 void terminate(); | 372 void terminate(); |
| 373 } | 373 } |
| 374 | 374 |
| 375 /** A stub for interacting with the main manager. */ | 375 /** A stub for interacting with the main manager. */ |
| 376 class _MainManagerStub implements _ManagerStub { | 376 class _MainManagerStub implements _ManagerStub { |
| 377 get id => 0; | 377 get id => 0; |
| (...skipping 883 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1261 _window.clearTimeout(_handle); | 1261 _window.clearTimeout(_handle); |
| 1262 } else { | 1262 } else { |
| 1263 _window.clearInterval(_handle); | 1263 _window.clearInterval(_handle); |
| 1264 } | 1264 } |
| 1265 } | 1265 } |
| 1266 } | 1266 } |
| 1267 | 1267 |
| 1268 Timer _timerFactory(int millis, void callback(Timer timer), bool repeating) => | 1268 Timer _timerFactory(int millis, void callback(Timer timer), bool repeating) => |
| 1269 repeating ? new _Timer.repeating(millis, callback) | 1269 repeating ? new _Timer.repeating(millis, callback) |
| 1270 : new _Timer(millis, callback); | 1270 : new _Timer(millis, callback); |
| OLD | NEW |