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

Unified Diff: lib/isolate/dart2js/isolateimpl.dart

Issue 10830230: Add Timer implementation for dart2js. Also moves tests to appropriate location. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 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:
View side-by-side diff with in-line comments
Download patch
Index: lib/isolate/dart2js/isolateimpl.dart
diff --git a/lib/isolate/dart2js/isolateimpl.dart b/lib/isolate/dart2js/isolateimpl.dart
index 397048667ac925f5899a37f27ed700cecde65217..9ccfd1fc515c18abedf8c7cb210f87f2c2d1efae 100644
--- a/lib/isolate/dart2js/isolateimpl.dart
+++ b/lib/isolate/dart2js/isolateimpl.dart
@@ -217,17 +217,6 @@ class _IsolateContext {
}
}
-// We don't want to import the DOM library just because of window.setTimeout,
-// so we reconstruct the Window class here. The only conflict that could happen
-// with the other DOMWindow class would be because of subclasses.
-// Currently, none of the two Dart classes have subclasses.
-typedef void _TimeoutHandler();
-class _Window native "@*DOMWindow" {
- int setTimeout(_TimeoutHandler handler, int timeout) native;
-}
-_Window get _window() native
- """return typeof window != 'undefined' ? window : (void 0);""";
-
/** Represent the event loop on a javascript thread (DOM or worker). */
class _EventLoop {
Queue<_IsolateEvent> events;
@@ -274,7 +263,7 @@ class _EventLoop {
* run asynchronously.
*/
void _runHelper() {
- if (_window != null) {
+ if (_window != null) { // (defined in timer_provider.dart)
kasperl 2012/08/09 06:15:33 Turn comment into a proper sentence and mention th
Siggi Cherem (dart-lang) 2012/08/09 20:37:14 Done.
// Run each iteration from the browser's top event loop.
void next() {
if (!runIteration()) return;

Powered by Google App Engine
This is Rietveld 408576698