Index: sdk/lib/html/dart2js/html_dart2js.dart |
diff --git a/sdk/lib/html/dart2js/html_dart2js.dart b/sdk/lib/html/dart2js/html_dart2js.dart |
index ac7d26c8e86a49242bf0529eb320d478016b7212..018b8aa93a10c2ead94f064616a433dc50934513 100644 |
--- a/sdk/lib/html/dart2js/html_dart2js.dart |
+++ b/sdk/lib/html/dart2js/html_dart2js.dart |
@@ -32781,10 +32781,6 @@ get _timerFactoryClosure => (int milliSeconds, void callback(Timer timer), bool |
return timer; |
}; |
-const _NEW_TIMER = 'NEW_TIMER'; |
Anton Muhin
2013/03/29 09:47:24
that looks wrong, mind if I move the whole Timer i
vsm
2013/03/29 14:14:54
How about an IsolateTimer (or similar) file? I co
Anton Muhin
2013/03/29 16:14:33
I'd prefer to move it to Dartium specific code for
|
-const _CANCEL_TIMER = 'CANCEL_TIMER'; |
-const _TIMER_PING = 'TIMER_PING'; |
- |
class _PureIsolateTimer implements Timer { |
final ReceivePort _port = new ReceivePort(); |
SendPort _sendPort; // Effectively final. |
@@ -32812,27 +32808,6 @@ class _PureIsolateTimer implements Timer { |
void _cancel() { |
_port.close(); |
} |
- |
- static final Future<SendPort> _HELPER_ISOLATE_PORT = |
- spawnDomFunction(_helperIsolateMain); |
-} |
- |
-final _TIMER_REGISTRY = new Map<SendPort, Timer>(); |
- |
-_helperIsolateMain() { |
- port.receive((msg, replyTo) { |
- final cmd = msg[0]; |
- if (cmd == _NEW_TIMER) { |
- final duration = new Duration(milliseconds: msg[1]); |
- bool periodic = msg[2]; |
- final callback = () { replyTo.send(_TIMER_PING); }; |
- _TIMER_REGISTRY[replyTo] = periodic ? |
- new Timer.periodic(duration, callback) : |
- new Timer(duration, callback); |
- } else if (cmd == _CANCEL_TIMER) { |
- _TIMER_REGISTRY.remove(replyTo).cancel(); |
- } |
- }); |
} |
get _pureIsolateTimerFactoryClosure => |