Chromium Code Reviews| 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 library _isolate_helper; | 5 library _isolate_helper; |
| 6 | 6 |
| 7 import 'dart:_js_embedded_names' show | 7 import 'dart:_js_embedded_names' show |
| 8 CLASS_ID_EXTRACTOR, | 8 CLASS_ID_EXTRACTOR, |
| 9 CLASS_FIELDS_EXTRACTOR, | 9 CLASS_FIELDS_EXTRACTOR, |
| 10 CURRENT_SCRIPT, | 10 CURRENT_SCRIPT, |
| (...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 645 return true; | 645 return true; |
| 646 } | 646 } |
| 647 | 647 |
| 648 /** | 648 /** |
| 649 * Runs multiple iterations of the run-loop. If possible, each iteration is | 649 * Runs multiple iterations of the run-loop. If possible, each iteration is |
| 650 * run asynchronously. | 650 * run asynchronously. |
| 651 */ | 651 */ |
| 652 void _runHelper() { | 652 void _runHelper() { |
| 653 if (globalWindow != null) { | 653 if (globalWindow != null) { |
| 654 // Run each iteration from the browser's top event loop. | 654 // Run each iteration from the browser's top event loop. |
| 655 // TODO(vsm): Revert to original pattern. | 655 // TODO(vsm): Revert to original pattern. |
|
vsm
2015/05/14 22:04:28
Can you delete my TODO? :-)
Jennifer Messerly
2015/05/14 23:00:48
oops. Yes!
| |
| 656 // See: https://github.com/dart-lang/dev_compiler/issues/177 | 656 // See: https://github.com/dart-lang/dev_compiler/issues/177 |
| 657 Function next = () { | 657 next() { |
| 658 if (!runIteration()) return; | 658 if (!runIteration()) return; |
| 659 Timer.run(next); | 659 Timer.run(next); |
| 660 }; | 660 } |
| 661 next(); | 661 next(); |
| 662 } else { | 662 } else { |
| 663 // Run synchronously until no more iterations are available. | 663 // Run synchronously until no more iterations are available. |
| 664 while (runIteration()) {} | 664 while (runIteration()) {} |
| 665 } | 665 } |
| 666 } | 666 } |
| 667 | 667 |
| 668 /** | 668 /** |
| 669 * Call [_runHelper] but ensure that worker exceptions are propragated. | 669 * Call [_runHelper] but ensure that worker exceptions are propragated. |
| 670 */ | 670 */ |
| (...skipping 782 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1453 } | 1453 } |
| 1454 | 1454 |
| 1455 bool operator==(Object other) { | 1455 bool operator==(Object other) { |
| 1456 if (identical(other, this)) return true; | 1456 if (identical(other, this)) return true; |
| 1457 if (other is CapabilityImpl) { | 1457 if (other is CapabilityImpl) { |
| 1458 return identical(_id, other._id); | 1458 return identical(_id, other._id); |
| 1459 } | 1459 } |
| 1460 return false; | 1460 return false; |
| 1461 } | 1461 } |
| 1462 } | 1462 } |
| OLD | NEW |