| Index: tools/dom/src/Timer.dart
|
| diff --git a/tools/dom/src/Timer.dart b/tools/dom/src/Timer.dart
|
| index 8d3660976a89b6319a3c335345ed5dac3014f78f..604899bc47759e7076c04959f63cbe451e6a8352 100644
|
| --- a/tools/dom/src/Timer.dart
|
| +++ b/tools/dom/src/Timer.dart
|
| @@ -4,7 +4,6 @@
|
|
|
| part of html;
|
|
|
| -// TODO(antonm): support not DOM isolates too.
|
| class _Timer implements Timer {
|
| final canceller;
|
|
|
| @@ -55,22 +54,8 @@ class _PureIsolateTimer implements Timer {
|
| _port.close();
|
| }
|
|
|
| - // Tricky part.
|
| - // Once _HELPER_ISOLATE_PORT gets resolved, it will still delay in .then
|
| - // and to delay Timer.run is used. However, Timer.run will try to register
|
| - // another Timer and here we got stuck: event cannot be posted as then
|
| - // callback is not executed because it's delayed with timer.
|
| - // Therefore once future is resolved, it's unsafe to call .then on it
|
| - // in Timer code.
|
| _send(msg) {
|
| - if (_SEND_PORT != null) {
|
| - _SEND_PORT.send(msg, _sendPort);
|
| - } else {
|
| - _HELPER_ISOLATE_PORT.then((port) {
|
| - _SEND_PORT = port;
|
| - _SEND_PORT.send(msg, _sendPort);
|
| - });
|
| - }
|
| + _sendToHelperIsolate(msg, _sendPort);
|
| }
|
| }
|
|
|
|
|