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

Unified Diff: runtime/lib/event_loop_patch.dart

Issue 12380060: Add first version of runAsync. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update documentation. Created 7 years, 10 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: runtime/lib/event_loop_patch.dart
diff --git a/tests/compiler/dart2js_extra/deferred/deferred_class_library.dart b/runtime/lib/event_loop_patch.dart
similarity index 53%
copy from tests/compiler/dart2js_extra/deferred/deferred_class_library.dart
copy to runtime/lib/event_loop_patch.dart
index bf9a9dd5c760f3b7bff3acffa3cc9bb6ecc009f7..98e9bf2521a3bf195d1340ad5949b3f1813b36b6 100644
--- a/tests/compiler/dart2js_extra/deferred/deferred_class_library.dart
+++ b/runtime/lib/event_loop_patch.dart
@@ -2,13 +2,9 @@
// 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.
-// Imported by deferred_class_test.dart.
-
-library deferred_class_library;
-
-class MyClass {
- foo(x) {
- print('MyClass.foo($x)');
- return (x - 3) ~/ 2;
+patch class _AsyncRun {
+ /* patch */ static void _enqueueImmediate(void callback()) {
+ // TODO(floitsch): don't use the Timer to enqueue the immediate callback.
+ Timer.run(callback);
}
}

Powered by Google App Engine
This is Rietveld 408576698