Index: tests/language/closure_cycles_test.dart |
diff --git a/tests/language/closure_cycles_test.dart b/tests/language/closure_cycles_test.dart |
index 726599daa16615119b83827af16005b321b5500f..7aded11a32465a4a9bf6bb4e3e4ba11fcaeced42 100644 |
--- a/tests/language/closure_cycles_test.dart |
+++ b/tests/language/closure_cycles_test.dart |
@@ -10,7 +10,7 @@ import "dart:async"; |
class X { |
Function onX; |
- X() { new Timer(0, (_) => onX(new Y())); } |
+ X() { Timer.run(() => onX(new Y())); } |
} |
class Y { |
@@ -22,7 +22,7 @@ class Y { |
heavyMemory = new List(10*1024*1024); |
// Terminate the test if we allocated enough memory without running out. |
if (count++ > 100) return; |
- new Timer(0, (_) => onY()); |
+ Timer.run(() => onY()); |
} |
} |