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

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 13515004: Remove pseudo-shared Timer implementation. (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 6f2706fba749049dd49f06484f8b2fdb8a3b0dbc..7fe5acbe3aa433399e16e90ed31f9a3d5322e5a6 100644
--- a/sdk/lib/html/dart2js/html_dart2js.dart
+++ b/sdk/lib/html/dart2js/html_dart2js.dart
@@ -31084,69 +31084,6 @@ class Rect {
// BSD-style license that can be found in the LICENSE file.
-class _Timer implements Timer {
- final canceller;
-
- _Timer(this.canceller);
-
- void cancel() { canceller(); }
-}
-
-get _timerFactoryClosure => (int milliSeconds, void callback(Timer timer), bool repeating) {
- var maker;
- var canceller;
- if (repeating) {
- maker = window._setInterval;
- canceller = window._clearInterval;
- } else {
- maker = window._setTimeout;
- canceller = window._clearTimeout;
- }
- Timer timer;
- final int id = maker(() { callback(timer); }, milliSeconds);
- timer = new _Timer(() { canceller(id); });
- return timer;
-};
-
-class _PureIsolateTimer implements Timer {
- final ReceivePort _port = new ReceivePort();
- SendPort _sendPort; // Effectively final.
-
- static SendPort _SEND_PORT;
-
- _PureIsolateTimer(int milliSeconds, callback, repeating) {
- _sendPort = _port.toSendPort();
- _port.receive((msg, replyTo) {
- assert(msg == _TIMER_PING);
- callback(this);
- if (!repeating) _cancel();
- });
-
- _send([_NEW_TIMER, milliSeconds, repeating]);
- }
-
- void cancel() {
- _cancel();
- _send([_CANCEL_TIMER]);
- }
-
- void _cancel() {
- _port.close();
- }
-
- _send(msg) {
- _sendToHelperIsolate(msg, _sendPort);
- }
-}
-
-get _pureIsolateTimerFactoryClosure =>
- ((int milliSeconds, void callback(Timer time), bool repeating) =>
- new _PureIsolateTimer(milliSeconds, callback, repeating));
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-
class _HttpRequestUtils {
// Helper for factory HttpRequest.get
« 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