Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(35)

Unified Diff: sdk/lib/html/dart2js/html_dart2js.dart

Side-by-side diff isn't available for this file because of its large size.
Issue 13185006: Redirect pure isolate print to helper isolate. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
Download patch
« no previous file with comments | « no previous file | sdk/lib/html/dartium/html_dartium.dart » ('j') | tools/dom/src/native_DOMImplementation.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 =>
« no previous file with comments | « no previous file | sdk/lib/html/dartium/html_dartium.dart » ('j') | tools/dom/src/native_DOMImplementation.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698