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

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
« no previous file with comments | « lib/isolate/dart2js/compiler_hooks.dart ('k') | lib/isolate/dart2js/timer_provider.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/isolate/dart2js/isolateimpl.dart
diff --git a/lib/isolate/dart2js/isolateimpl.dart b/lib/isolate/dart2js/isolateimpl.dart
index 397048667ac925f5899a37f27ed700cecde65217..bec8d1799154b5cae0a48c49ea59dee9352e2b40 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,6 +263,7 @@ class _EventLoop {
* run asynchronously.
*/
void _runHelper() {
+ // [_window] is defined in timer_provider.dart.
if (_window != null) {
// Run each iteration from the browser's top event loop.
void next() {
« no previous file with comments | « lib/isolate/dart2js/compiler_hooks.dart ('k') | lib/isolate/dart2js/timer_provider.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698