Live image cache (#51249)

* Revert "Revert "Live image cache (#50318)" (#51131)"

This reverts commit 2f09d601b5.

* Fix eviction of a pending image
This commit is contained in:
Dan Field
2020-02-24 13:47:53 -08:00
committed by GitHub
parent 9ba4eb04dd
commit e2dcdb60e3
10 changed files with 785 additions and 55 deletions

View File

@@ -20,7 +20,7 @@ void main() {
final developer.ServiceProtocolInfo info = await developer.Service.getInfo();
if (info.serverUri == null) {
throw TestFailure('This test _must_ be run with --enable-vmservice.');
fail('This test _must_ be run with --enable-vmservice.');
}
await timelineObtainer.connect(info.serverUri);
await timelineObtainer.setDartFlags();
@@ -58,7 +58,8 @@ void main() {
'name': 'ImageCache.clear',
'args': <String, dynamic>{
'pendingImages': 1,
'cachedImages': 0,
'keepAliveImages': 0,
'liveImages': 1,
'currentSizeInBytes': 0,
'isolateId': isolateId,
}
@@ -149,7 +150,7 @@ class TimelineObtainer {
Future<void> close() async {
expect(_completers, isEmpty);
await _observatorySocket.close();
await _observatorySocket?.close();
}
}