| Index: tests/standalone/io/code_collection_test.dart
|
| diff --git a/tests/standalone/io/code_collection_test.dart b/tests/standalone/io/code_collection_test.dart
|
| index 43df6f733285063a51b048a3e3853684f25470eb..046c3c39a8db727097d3dffb3aaf245bec770e23 100644
|
| --- a/tests/standalone/io/code_collection_test.dart
|
| +++ b/tests/standalone/io/code_collection_test.dart
|
| @@ -11,6 +11,7 @@ import "dart:io";
|
|
|
| int foo(int x) {
|
| x = x + 1;
|
| + print("foo=$x");
|
| return x;
|
| }
|
|
|
| @@ -25,18 +26,18 @@ List<int> bar() {
|
| doTest() {
|
| var i = 0;
|
| var ret = foo(1); // Initial call to compile.
|
| - print("foo=$ret");
|
| // Time passes, GC runs, foo's code is dropped.
|
| var ms = const Duration(milliseconds: 100);
|
| var t = new Timer.periodic(ms, (timer) {
|
| i++;
|
| + // Calling bar will trigger GC without foo being on the stack. This way
|
| + // the method can be collected.
|
| bar();
|
| if (i > 1) {
|
| timer.cancel();
|
| // foo is called again to make sure we can still run it even after
|
| // its code has been detached.
|
| var ret = foo(2);
|
| - print("foo=$ret");
|
| }
|
| });
|
| }
|
|
|