Make initialSemanticsTreeCreation less sensitive to GC timing. (#19491)

Bug: https://github.com/flutter/flutter/issues/19435
This commit is contained in:
Ryan Macnak
2018-07-18 10:00:16 -07:00
committed by GitHub
parent b8b6d4166c
commit 3840719987

View File

@@ -5,7 +5,16 @@
import 'package:flutter_driver/driver_extension.dart';
import 'package:complex_layout/main.dart' as app;
// Avoid sensitivity to GC timing.
dynamic provokeSemispaceGrowth() {
dynamic tree(int n) {
return n == 0 ? null : <dynamic>[tree(n - 1), tree(n - 1)];
}
return tree(16); // 2^16 * 6 words ~= 1.5 MB
}
void main() {
provokeSemispaceGrowth();
enableFlutterDriverExtension();
app.main();
}